mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
lets always show the exclude confirmation dialog
This commit is contained in:
parent
de0969bad3
commit
5064ca612f
4 changed files with 2 additions and 17 deletions
|
@ -193,15 +193,10 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun tryExcludeFolder() {
|
private fun tryExcludeFolder() {
|
||||||
if (config.wasExcludeFolderTooltipShown) {
|
|
||||||
excludeFolder()
|
|
||||||
} else {
|
|
||||||
ConfirmationDialog(this, getString(R.string.exclude_folder_description)) {
|
ConfirmationDialog(this, getString(R.string.exclude_folder_description)) {
|
||||||
config.wasExcludeFolderTooltipShown = true
|
|
||||||
excludeFolder()
|
excludeFolder()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private fun excludeFolder() {
|
private fun excludeFolder() {
|
||||||
config.addExcludedFolder(mPath)
|
config.addExcludedFolder(mPath)
|
||||||
|
|
|
@ -196,15 +196,10 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList<Direc
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun tryExcludeFolder() {
|
private fun tryExcludeFolder() {
|
||||||
if (config.wasExcludeFolderTooltipShown) {
|
|
||||||
excludeFolder()
|
|
||||||
} else {
|
|
||||||
ConfirmationDialog(activity, activity.getString(R.string.exclude_folder_description)) {
|
ConfirmationDialog(activity, activity.getString(R.string.exclude_folder_description)) {
|
||||||
config.wasExcludeFolderTooltipShown = true
|
|
||||||
excludeFolder()
|
excludeFolder()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private fun excludeFolder() {
|
private fun excludeFolder() {
|
||||||
activity.config.addExcludedFolders(getSelectedPaths())
|
activity.config.addExcludedFolders(getSelectedPaths())
|
||||||
|
|
|
@ -38,10 +38,6 @@ class Config(context: Context) : BaseConfig(context) {
|
||||||
get() = prefs.getBoolean(HIDE_FOLDER_TOOLTIP_SHOWN, false)
|
get() = prefs.getBoolean(HIDE_FOLDER_TOOLTIP_SHOWN, false)
|
||||||
set(wasShown) = prefs.edit().putBoolean(HIDE_FOLDER_TOOLTIP_SHOWN, wasShown).apply()
|
set(wasShown) = prefs.edit().putBoolean(HIDE_FOLDER_TOOLTIP_SHOWN, wasShown).apply()
|
||||||
|
|
||||||
var wasExcludeFolderTooltipShown: Boolean
|
|
||||||
get() = prefs.getBoolean(EXCLUDE_FOLDER_TOOLTIP_SHOWN, false)
|
|
||||||
set(wasShown) = prefs.edit().putBoolean(EXCLUDE_FOLDER_TOOLTIP_SHOWN, wasShown).apply()
|
|
||||||
|
|
||||||
var showHiddenFolders: Boolean
|
var showHiddenFolders: Boolean
|
||||||
get() = prefs.getBoolean(SHOW_HIDDEN_FOLDERS, false)
|
get() = prefs.getBoolean(SHOW_HIDDEN_FOLDERS, false)
|
||||||
set(showHiddenFolders) = prefs.edit().putBoolean(SHOW_HIDDEN_FOLDERS, showHiddenFolders).apply()
|
set(showHiddenFolders) = prefs.edit().putBoolean(SHOW_HIDDEN_FOLDERS, showHiddenFolders).apply()
|
||||||
|
|
|
@ -16,7 +16,6 @@ val SHOW_ALL = "show_all" // display images and videos from all folders togeth
|
||||||
val SHOW_MEDIA = "show_media"
|
val SHOW_MEDIA = "show_media"
|
||||||
val SAVE_FOLDER_PREFIX = "folder_"
|
val SAVE_FOLDER_PREFIX = "folder_"
|
||||||
val HIDE_FOLDER_TOOLTIP_SHOWN = "hide_folder_tooltip_shown"
|
val HIDE_FOLDER_TOOLTIP_SHOWN = "hide_folder_tooltip_shown"
|
||||||
val EXCLUDE_FOLDER_TOOLTIP_SHOWN = "exclude_folder_tooltip_shown"
|
|
||||||
val EXCLUDED_FOLDERS = "excluded_folders"
|
val EXCLUDED_FOLDERS = "excluded_folders"
|
||||||
|
|
||||||
val NOMEDIA = ".nomedia"
|
val NOMEDIA = ".nomedia"
|
||||||
|
|
Loading…
Reference in a new issue