properly reset search results and placeholders on close
This commit is contained in:
parent
be8003718f
commit
f05fffc206
1 changed files with 7 additions and 3 deletions
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue