From bd077cba8cd295dbda708f1b2599913fddb4619f Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 24 Apr 2018 10:04:49 +0200 Subject: [PATCH] disable media pull-to-refresh while Search is open --- .../com/simplemobiletools/gallery/activities/MediaActivity.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index 471c57b2a..4b91853fa 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -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 } })