store custom folder order in shared prefs
This commit is contained in:
parent
fc2d42490a
commit
5dcad025bb
|
@ -175,6 +175,9 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
|
|||
override fun onActionModeDestroyed() {
|
||||
if (isChangingOrder) {
|
||||
notifyDataSetChanged()
|
||||
|
||||
val reorderedFoldersList = dirs.map { it.path }
|
||||
config.customFoldersOrder = TextUtils.join("|||", reorderedFoldersList)
|
||||
}
|
||||
|
||||
isChangingOrder = false
|
||||
|
|
|
@ -515,4 +515,8 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
var fileRoundedCorners: Boolean
|
||||
get() = prefs.getBoolean(FILE_ROUNDED_CORNERS, false)
|
||||
set(fileRoundedCorners) = prefs.edit().putBoolean(FILE_ROUNDED_CORNERS, fileRoundedCorners).apply()
|
||||
|
||||
var customFoldersOrder: String
|
||||
get() = prefs.getString(CUSTOM_FOLDERS_ORDER, "")!!
|
||||
set(customFoldersOrder) = prefs.edit().putString(CUSTOM_FOLDERS_ORDER, customFoldersOrder).apply()
|
||||
}
|
||||
|
|
|
@ -88,6 +88,7 @@ const val FOLDER_MEDIA_COUNT = "folder_media_count"
|
|||
const val LIMIT_FOLDER_TITLE = "folder_limit_title"
|
||||
const val THUMBNAIL_SPACING = "thumbnail_spacing"
|
||||
const val FILE_ROUNDED_CORNERS = "file_rounded_corners"
|
||||
const val CUSTOM_FOLDERS_ORDER = "custom_folders_order"
|
||||
|
||||
// slideshow
|
||||
const val SLIDESHOW_INTERVAL = "slideshow_interval"
|
||||
|
|
Loading…
Reference in New Issue