From 8a8744fee73f7da83d267c335d337c386d509af8 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 7 Jun 2020 16:17:08 +0200 Subject: [PATCH] do not close Search on Stop --- .../gallery/pro/activities/MediaActivity.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt index ba452bfb1..2095aa11c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt @@ -162,10 +162,13 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { media_horizontal_fastscroller.allowBubbleDisplay = config.showInfoBubble media_vertical_fastscroller.allowBubbleDisplay = config.showInfoBubble media_refresh_layout.isEnabled = config.enablePullToRefresh - invalidateOptionsMenu() media_empty_text_placeholder.setTextColor(config.textColor) media_empty_text_placeholder_2.setTextColor(getAdjustedPrimaryColor()) + if (!mIsSearchOpen) { + invalidateOptionsMenu() + } + if (mMedia.isEmpty() || config.getFolderSorting(mPath) and SORT_BY_RANDOM == 0) { if (shouldSkipAuthentication()) { tryLoadGallery() @@ -195,7 +198,6 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { override fun onStop() { super.onStop() - mSearchMenuItem?.collapseActionView() if (config.temporarilyShowHidden || config.tempSkipDeleteConfirmation) { mTempShowHiddenHandler.postDelayed({