diff --git a/app/build.gradle b/app/build.gradle index 789d5244..12e7c83e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -58,7 +58,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.23.8' + implementation 'com.simplemobiletools:commons:5.23.13' implementation 'com.github.Stericson:RootTools:df729dcb13' implementation 'com.github.Stericson:RootShell:1.6' implementation 'com.alexvasilkov:gesture-views:2.5.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/dialogs/ChangeSortingDialog.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/dialogs/ChangeSortingDialog.kt index 2022c2ba..ef1452a9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/dialogs/ChangeSortingDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/dialogs/ChangeSortingDialog.kt @@ -63,9 +63,9 @@ class ChangeSortingDialog(val activity: BaseSimpleActivity, val path: String = " } if (view.sorting_dialog_use_for_this_folder.isChecked) { - config.saveFolderSorting(path, sorting) + config.saveCustomSorting(path, sorting) } else { - config.removeFolderSorting(path) + config.removeCustomSorting(path) config.sorting = sorting } callback() diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/helpers/Config.kt index 90973baa..3572c79f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/helpers/Config.kt @@ -62,22 +62,6 @@ class Config(context: Context) : BaseConfig(context) { get() = prefs.getStringSet(FAVORITES, HashSet())!! set(favorites) = prefs.edit().remove(FAVORITES).putStringSet(FAVORITES, favorites).apply() - fun saveFolderSorting(path: String, value: Int) { - if (path.isEmpty()) { - sorting = value - } else { - prefs.edit().putInt(SORT_FOLDER_PREFIX + path, value).apply() - } - } - - fun getFolderSorting(path: String) = prefs.getInt(SORT_FOLDER_PREFIX + path, sorting) - - fun removeFolderSorting(path: String) { - prefs.edit().remove(SORT_FOLDER_PREFIX + path).apply() - } - - fun hasCustomSorting(path: String) = prefs.contains(SORT_FOLDER_PREFIX + path) - var isRootAvailable: Boolean get() = prefs.getBoolean(IS_ROOT_AVAILABLE, false) set(isRootAvailable) = prefs.edit().putBoolean(IS_ROOT_AVAILABLE, isRootAvailable).apply()