updating commons with some Search fixes

This commit is contained in:
tibbi 2023-01-12 11:10:41 +01:00
parent 7ab6e1d2a9
commit 040abcebdf
4 changed files with 5 additions and 9 deletions

View file

@ -78,7 +78,7 @@ android {
} }
dependencies { 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 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
implementation 'it.sephiroth.android.exif:library:1.0.1' implementation 'it.sephiroth.android.exif:library:1.0.1'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.24' implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.24'

View file

@ -337,13 +337,11 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
main_menu.toggleHideOnScroll(true) main_menu.toggleHideOnScroll(true)
main_menu.setupMenu() main_menu.setupMenu()
if (isPiePlus()) {
main_menu.onSearchOpenListener = { main_menu.onSearchOpenListener = {
if (config.searchAllFilesByDefault) { if (config.searchAllFilesByDefault) {
launchSearchActivity() launchSearchActivity()
} }
} }
}
main_menu.onSearchTextChangedListener = { text -> main_menu.onSearchTextChangedListener = { text ->
setupAdapter(mDirsIgnoringSearch, text) setupAdapter(mDirsIgnoringSearch, text)

View file

@ -57,7 +57,7 @@ class SearchActivity : SimpleActivity(), MediaOperationsListener {
search_menu.toggleHideOnScroll(true) search_menu.toggleHideOnScroll(true)
search_menu.setupMenu() search_menu.setupMenu()
search_menu.toggleForceArrowBackIcon(true) search_menu.toggleForceArrowBackIcon(true)
search_menu.requestFocus() search_menu.focusView()
search_menu.updateHintText(getString(R.string.search_files)) search_menu.updateHintText(getString(R.string.search_files))
search_menu.onNavigateBackClickListener = { search_menu.onNavigateBackClickListener = {

View file

@ -226,9 +226,7 @@ class SettingsActivity : SimpleActivity() {
config.showHiddenMedia = settings_show_hidden_items.isChecked 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() { private fun setupSearchAllFiles() {
settings_search_all_files_holder.beVisibleIf(isPiePlus())
settings_search_all_files.isChecked = config.searchAllFilesByDefault settings_search_all_files.isChecked = config.searchAllFilesByDefault
settings_search_all_files_holder.setOnClickListener { settings_search_all_files_holder.setOnClickListener {
settings_search_all_files.toggle() settings_search_all_files.toggle()