From 4bca7cb12a1370d234da293b72439d5b12dc3468 Mon Sep 17 00:00:00 2001 From: Agnieszka C <85929121+Aga-C@users.noreply.github.com> Date: Wed, 11 Jan 2023 13:53:20 +0100 Subject: [PATCH] Change search hint on the main screen according to the setting --- .../gallery/pro/activities/MainActivity.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 534625eb2..21e5a9b83 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 @@ -245,6 +245,12 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { tryLoadGallery() } } + + if (config.searchAllFilesByDefault) { + main_menu.updateHintText(getString(R.string.search_files)) + } else { + main_menu.updateHintText(getString(R.string.search_folders)) + } } override fun onPause() { @@ -330,7 +336,6 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { main_menu.getToolbar().inflateMenu(menuId) main_menu.toggleHideOnScroll(true) main_menu.setupMenu() - main_menu.updateHintText(getString(R.string.search_folders)) if (isPiePlus()) { main_menu.onSearchOpenListener = {