avoid doing any action on Search Collapsed during device rotation

This commit is contained in:
tibbi 2018-06-24 15:46:14 +02:00
parent 29dce88943
commit d69351fa99

View file

@ -274,10 +274,13 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
return true return true
} }
// this triggers on device rotation too, avoid doing anything
override fun onMenuItemActionCollapse(item: MenuItem?): Boolean { override fun onMenuItemActionCollapse(item: MenuItem?): Boolean {
mIsSearchOpen = false if (mIsSearchOpen) {
media_refresh_layout.isEnabled = config.enablePullToRefresh mIsSearchOpen = false
searchQueryChanged("") media_refresh_layout.isEnabled = config.enablePullToRefresh
searchQueryChanged("")
}
return true return true
} }
}) })