properly reset search results and placeholders on close

This commit is contained in:
tibbi 2023-01-03 16:05:28 +01:00
parent be8003718f
commit f05fffc206

View File

@ -147,7 +147,11 @@ class MainActivity : SimpleActivity() {
} }
main_menu.onSearchClosedListener = { main_menu.onSearchClosedListener = {
search_holder.fadeOut() search_holder.animate().alpha(0f).setDuration(SHORT_ANIMATION_DURATION).withEndAction {
search_holder.beGone()
searchTextChanged("", true)
}.start()
conversations_fab.beVisible() conversations_fab.beVisible()
} }
@ -429,8 +433,8 @@ class MainActivity : SimpleActivity() {
.build() .build()
} }
private fun searchTextChanged(text: String) { private fun searchTextChanged(text: String, forceUpdate: Boolean = false) {
if (!main_menu.isSearchOpen) { if (!main_menu.isSearchOpen && !forceUpdate) {
return return
} }