From c081fd18bfa23690d20a7cad0bafb9dbdcac858d Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 16 Jul 2018 23:48:42 +0200 Subject: [PATCH] fix #200, close search at changing tab --- .../com/simplemobiletools/contacts/activities/MainActivity.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/activities/MainActivity.kt index 806fa429..c72b5fdc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/activities/MainActivity.kt @@ -296,6 +296,10 @@ class MainActivity : SimpleActivity(), RefreshContactsListener { it.icon?.applyColorFilter(config.textColor) }, tabSelectedAction = { + if (isSearchOpen) { + getCurrentFragment()?.onSearchQueryChanged("") + searchMenuItem?.collapseActionView() + } viewpager.currentItem = it.position it.icon?.applyColorFilter(getAdjustedPrimaryColor()) }