Skip to content

Commit

Permalink
sort conversations only if text is present
Browse files Browse the repository at this point in the history
Signed-off-by: sowjanyakch <[email protected]>
  • Loading branch information
sowjanyakch committed Dec 19, 2024
1 parent ab5ac35 commit 7ebdae9
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down

0 comments on commit 7ebdae9

Please sign in to comment.