Skip to content
Snippets Groups Projects
Commit de8ec561 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

contact search: fix selection glitch

GitLab: #1221
Change-Id: I4279891bde91c0d97bec3ed1058b401571f85728
parent 7f8bab96
Branches
Tags
No related merge requests found
/*
* Copyright (C) 2004-2022 Savoir-faire Linux Inc.
*
* Author: Michel Schmit <michel.schmit@savoirfairelinux.com>
* Copyright (C) 2004-2023 Savoir-faire Linux Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -58,16 +56,10 @@ class ContactSearchFragment : BaseSearchFragment<ContactSearchPresenter>(),
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
mTextEditor = view.findViewById(R.id.lb_search_text_editor)
}
override fun onResume() {
super.onResume()
mTextEditor?.requestFocus()
}
override fun getResultsAdapter(): ObjectAdapter {
return mRowsAdapter
}
override fun getResultsAdapter(): ObjectAdapter = mRowsAdapter
override fun onQueryTextChange(newQuery: String): Boolean {
presenter.queryTextChanged(newQuery)
......@@ -125,12 +117,6 @@ class ContactSearchFragment : BaseSearchFragment<ContactSearchPresenter>(),
contacts.conversations.map { item -> ContactCard(item, Card.Type.CONTACT_ONLINE) }, diff)
}
}
if (scrollToTop) {
rowsSupportFragment.view?.postDelayed({
rowsSupportFragment.verticalGridView.smoothScrollToPosition(0)
mTextEditor?.requestFocus()
}, 300)
}
}
override fun clearSearch() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment