partial fix - now need to reset highlighting after exit
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
This commit is contained in:
Родитель
2f2219588e
Коммит
45cb74d4ce
|
@ -373,7 +373,8 @@ class ConversationsListActivity :
|
|||
conversationsListViewModel.getRoomsFlow
|
||||
.onEach { list ->
|
||||
// Update Conversations
|
||||
conversationItems.clear()
|
||||
conversationItemsWithHeader.clear()
|
||||
conversationItems.clear() // fixme remove this
|
||||
for (conversation in list) {
|
||||
addToConversationItems(conversation)
|
||||
}
|
||||
|
@ -538,6 +539,12 @@ class ConversationsListActivity :
|
|||
if (searchManager != null) {
|
||||
searchView!!.setSearchableInfo(searchManager.getSearchableInfo(componentName))
|
||||
}
|
||||
initSearchDisposable()
|
||||
}
|
||||
}
|
||||
|
||||
private fun initSearchDisposable() {
|
||||
if (searchViewDisposable == null || searchViewDisposable?.isDisposed == true) {
|
||||
searchViewDisposable = observeSearchView(searchView!!)
|
||||
.debounce { query: String? ->
|
||||
if (TextUtils.isEmpty(query)) {
|
||||
|
@ -629,6 +636,7 @@ class ConversationsListActivity :
|
|||
}
|
||||
searchItem!!.setOnActionExpandListener(object : MenuItem.OnActionExpandListener {
|
||||
override fun onMenuItemActionExpand(item: MenuItem): Boolean {
|
||||
initSearchDisposable()
|
||||
adapter!!.setHeadersShown(true)
|
||||
if (!filterState.containsValue(true)) filterableConversationItems = searchableConversationItems
|
||||
adapter!!.updateDataSet(filterableConversationItems, false)
|
||||
|
|
Загрузка…
Ссылка в новой задаче