diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt index a1e5d2c3f..991223ecf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt @@ -146,7 +146,10 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener { search_holder.background = ColorDrawable(config.backgroundColor) checkSwipeRefreshAvailability() checkShortcuts() - invalidateOptionsMenu() + + if (!mIsSearchOpen) { + invalidateOptionsMenu() + } } override fun onPause() { @@ -154,11 +157,6 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener { storeStateVariables() } - override fun onStop() { - super.onStop() - closeSearch() - } - override fun onDestroy() { super.onDestroy() if (!isChangingConfigurations) {