shorten the search close code

This commit is contained in:
tibbi 2018-01-31 18:18:35 +01:00
parent 2c5daff95c
commit da2219f160
1 changed files with 1 additions and 3 deletions

View File

@ -222,9 +222,7 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
override fun onPageScrollStateChanged(state: Int) {
if (isSearchOpen) {
getCurrentFragment().onSearchQueryChanged("")
if (searchMenuItem != null) {
MenuItemCompat.collapseActionView(searchMenuItem)
}
searchMenuItem?.collapseActionView()
}
}