sort conversations only if text is present

Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
sowjanyakch 2024-12-19 16:29:55 +01:00 committed by Marcel Hibbe
parent 298cf3a249
commit 006cfae6f1
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -70,10 +70,11 @@ class ListOpenConversationsActivity : BaseActivity() {
handleSearchUI(searching)
}
binding.editText.doOnTextChanged { text, _, _, count ->
openConversationsViewModel.updateSearchTerm(text.toString())
openConversationsViewModel.fetchConversations()
if (!text.isNullOrBlank()) {
openConversationsViewModel.updateSearchTerm(text.toString())
openConversationsViewModel.fetchConversations()
}
}
initObservers()
}