From 040abcebdf5ce93b00a14c4294562036231cf581 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 12 Jan 2023 11:10:41 +0100 Subject: [PATCH] updating commons with some Search fixes --- app/build.gradle | 2 +- .../gallery/pro/activities/MainActivity.kt | 8 +++----- .../gallery/pro/activities/SearchActivity.kt | 2 +- .../gallery/pro/activities/SettingsActivity.kt | 2 -- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index cb952fc1c..0731f6fe2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -78,7 +78,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:185891674f' + implementation 'com.github.SimpleMobileTools:Simple-Commons:449b24c6a4' implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0' implementation 'it.sephiroth.android.exif:library:1.0.1' implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.24' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt index 21e5a9b83..1082e0c98 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt @@ -337,11 +337,9 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { main_menu.toggleHideOnScroll(true) main_menu.setupMenu() - if (isPiePlus()) { - main_menu.onSearchOpenListener = { - if (config.searchAllFilesByDefault) { - launchSearchActivity() - } + main_menu.onSearchOpenListener = { + if (config.searchAllFilesByDefault) { + launchSearchActivity() } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SearchActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SearchActivity.kt index aa232467e..00e58e819 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SearchActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SearchActivity.kt @@ -57,7 +57,7 @@ class SearchActivity : SimpleActivity(), MediaOperationsListener { search_menu.toggleHideOnScroll(true) search_menu.setupMenu() search_menu.toggleForceArrowBackIcon(true) - search_menu.requestFocus() + search_menu.focusView() search_menu.updateHintText(getString(R.string.search_files)) search_menu.onNavigateBackClickListener = { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt index ff5b877ce..5e6977055 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt @@ -226,9 +226,7 @@ class SettingsActivity : SimpleActivity() { config.showHiddenMedia = settings_show_hidden_items.isChecked } - // show this on Android 9+ only due to a glitch on lower versions where search is automatically open on startup private fun setupSearchAllFiles() { - settings_search_all_files_holder.beVisibleIf(isPiePlus()) settings_search_all_files.isChecked = config.searchAllFilesByDefault settings_search_all_files_holder.setOnClickListener { settings_search_all_files.toggle()