Skip to content

Commit a5cdeaf

Browse files
committed
fix #381, apply the select sorting at the file pickers too
1 parent 2353dea commit a5cdeaf

File tree

3 files changed

+3
-19
lines changed

3 files changed

+3
-19
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ android {
5858
}
5959

6060
dependencies {
61-
implementation 'com.simplemobiletools:commons:5.23.8'
61+
implementation 'com.simplemobiletools:commons:5.23.13'
6262
implementation 'com.github.Stericson:RootTools:df729dcb13'
6363
implementation 'com.github.Stericson:RootShell:1.6'
6464
implementation 'com.alexvasilkov:gesture-views:2.5.2'

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/dialogs/ChangeSortingDialog.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ class ChangeSortingDialog(val activity: BaseSimpleActivity, val path: String = "
6363
}
6464

6565
if (view.sorting_dialog_use_for_this_folder.isChecked) {
66-
config.saveFolderSorting(path, sorting)
66+
config.saveCustomSorting(path, sorting)
6767
} else {
68-
config.removeFolderSorting(path)
68+
config.removeCustomSorting(path)
6969
config.sorting = sorting
7070
}
7171
callback()

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/helpers/Config.kt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,6 @@ class Config(context: Context) : BaseConfig(context) {
6262
get() = prefs.getStringSet(FAVORITES, HashSet<String>())!!
6363
set(favorites) = prefs.edit().remove(FAVORITES).putStringSet(FAVORITES, favorites).apply()
6464

65-
fun saveFolderSorting(path: String, value: Int) {
66-
if (path.isEmpty()) {
67-
sorting = value
68-
} else {
69-
prefs.edit().putInt(SORT_FOLDER_PREFIX + path, value).apply()
70-
}
71-
}
72-
73-
fun getFolderSorting(path: String) = prefs.getInt(SORT_FOLDER_PREFIX + path, sorting)
74-
75-
fun removeFolderSorting(path: String) {
76-
prefs.edit().remove(SORT_FOLDER_PREFIX + path).apply()
77-
}
78-
79-
fun hasCustomSorting(path: String) = prefs.contains(SORT_FOLDER_PREFIX + path)
80-
8165
var isRootAvailable: Boolean
8266
get() = prefs.getBoolean(IS_ROOT_AVAILABLE, false)
8367
set(isRootAvailable) = prefs.edit().putBoolean(IS_ROOT_AVAILABLE, isRootAvailable).apply()

0 commit comments

Comments
 (0)