disable media pull-to-refresh while Search is open

This commit is contained in:
tibbi 2018-04-24 10:04:49 +02:00
parent b56d4d6600
commit bd077cba8c

View file

@ -260,11 +260,13 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
MenuItemCompat.setOnActionExpandListener(mSearchMenuItem, object : MenuItemCompat.OnActionExpandListener {
override fun onMenuItemActionExpand(item: MenuItem?): Boolean {
mIsSearchOpen = true
media_refresh_layout.isEnabled = false
return true
}
override fun onMenuItemActionCollapse(item: MenuItem?): Boolean {
mIsSearchOpen = false
media_refresh_layout.isEnabled = config.enablePullToRefresh
return true
}
})