mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-01-18 22:37:59 +01:00
add recycle bin to pinned folders by default
This commit is contained in:
parent
3a7e93f095
commit
efc4e241ca
3 changed files with 11 additions and 0 deletions
|
@ -114,6 +114,11 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
config.addPinnedFolders(hashSetOf(FAVORITES))
|
||||
config.wereFavoritesPinned = true
|
||||
}
|
||||
|
||||
if (!config.wasRecycleBinPinned) {
|
||||
config.addPinnedFolders(hashSetOf(RECYCLE_BIN))
|
||||
config.wasRecycleBinPinned = true
|
||||
}
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
|
|
|
@ -349,6 +349,10 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
get() = prefs.getBoolean(WERE_FAVORITES_PINNED, false)
|
||||
set(wereFavoritesPinned) = prefs.edit().putBoolean(WERE_FAVORITES_PINNED, wereFavoritesPinned).apply()
|
||||
|
||||
var wasRecycleBinPinned: Boolean
|
||||
get() = prefs.getBoolean(WAS_RECYCLE_BIN_PINNED, false)
|
||||
set(wasRecycleBinPinned) = prefs.edit().putBoolean(WAS_RECYCLE_BIN_PINNED, wasRecycleBinPinned).apply()
|
||||
|
||||
var groupBy: Int
|
||||
get() = prefs.getInt(GROUP_BY, GROUP_BY_NONE)
|
||||
set(groupBy) = prefs.edit().putInt(GROUP_BY, groupBy).apply()
|
||||
|
|
|
@ -51,6 +51,7 @@ const val WAS_OTG_HANDLED = "was_otg_handled"
|
|||
const val TEMP_SKIP_DELETE_CONFIRMATION = "temp_skip_delete_confirmation"
|
||||
const val BOTTOM_ACTIONS = "bottom_actions"
|
||||
const val WERE_FAVORITES_PINNED = "were_favorites_pinned"
|
||||
const val WAS_RECYCLE_BIN_PINNED = "was_recycle_bin_pinned"
|
||||
const val GROUP_BY = "group_by"
|
||||
|
||||
// slideshow
|
||||
|
@ -67,6 +68,7 @@ const val SLIDESHOW_SCROLL_DURATION = 500L
|
|||
|
||||
const val NOMEDIA = ".nomedia"
|
||||
const val FAVORITES = "favorites"
|
||||
const val RECYCLE_BIN = "recycle_bin"
|
||||
const val SHOW_FAVORITES = "show_favorites"
|
||||
const val MAX_COLUMN_COUNT = 20
|
||||
const val SHOW_TEMP_HIDDEN_DURATION = 300000L
|
||||
|
|
Loading…
Reference in a new issue