mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-04-27 08:28:53 +02:00
fix #381, apply the select sorting at the file pickers too
This commit is contained in:
parent
2353dea92a
commit
a5cdeaf59c
app
build.gradle
src/main/kotlin/com/simplemobiletools/filemanager/pro
@ -58,7 +58,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
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:RootTools:df729dcb13'
|
||||||
implementation 'com.github.Stericson:RootShell:1.6'
|
implementation 'com.github.Stericson:RootShell:1.6'
|
||||||
implementation 'com.alexvasilkov:gesture-views:2.5.2'
|
implementation 'com.alexvasilkov:gesture-views:2.5.2'
|
||||||
|
@ -63,9 +63,9 @@ class ChangeSortingDialog(val activity: BaseSimpleActivity, val path: String = "
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (view.sorting_dialog_use_for_this_folder.isChecked) {
|
if (view.sorting_dialog_use_for_this_folder.isChecked) {
|
||||||
config.saveFolderSorting(path, sorting)
|
config.saveCustomSorting(path, sorting)
|
||||||
} else {
|
} else {
|
||||||
config.removeFolderSorting(path)
|
config.removeCustomSorting(path)
|
||||||
config.sorting = sorting
|
config.sorting = sorting
|
||||||
}
|
}
|
||||||
callback()
|
callback()
|
||||||
|
@ -62,22 +62,6 @@ class Config(context: Context) : BaseConfig(context) {
|
|||||||
get() = prefs.getStringSet(FAVORITES, HashSet<String>())!!
|
get() = prefs.getStringSet(FAVORITES, HashSet<String>())!!
|
||||||
set(favorites) = prefs.edit().remove(FAVORITES).putStringSet(FAVORITES, favorites).apply()
|
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
|
var isRootAvailable: Boolean
|
||||||
get() = prefs.getBoolean(IS_ROOT_AVAILABLE, false)
|
get() = prefs.getBoolean(IS_ROOT_AVAILABLE, false)
|
||||||
set(isRootAvailable) = prefs.edit().putBoolean(IS_ROOT_AVAILABLE, isRootAvailable).apply()
|
set(isRootAvailable) = prefs.edit().putBoolean(IS_ROOT_AVAILABLE, isRootAvailable).apply()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user