From 0a649df9c3cfe7a69f5cbad96e8a39f1acc6563c Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 26 Feb 2017 18:32:47 +0100 Subject: [PATCH] store if hide/exclude folder tooltip was shown in prefs --- .../com/simplemobiletools/gallery/helpers/Config.kt | 8 ++++++++ .../com/simplemobiletools/gallery/helpers/Constants.kt | 2 ++ 2 files changed, 10 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt index 1af19597a..4392c4bd6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt @@ -22,6 +22,14 @@ class Config(context: Context) : BaseConfig(context) { get() = prefs.getInt(DIRECTORY_SORT_ORDER, SORT_BY_DATE_MODIFIED or SORT_DESCENDING) set(order) = prefs.edit().putInt(DIRECTORY_SORT_ORDER, order).apply() + var wasHideFolderTooltipShown: Boolean + get() = prefs.getBoolean(HIDE_FOLDER_TOOLTIP_SHOWN, false) + 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 get() = prefs.getBoolean(SHOW_HIDDEN_FOLDERS, false) set(showHiddenFolders) = prefs.edit().putBoolean(SHOW_HIDDEN_FOLDERS, showHiddenFolders).apply() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt index 56cb2605b..d43d85ef8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt @@ -14,6 +14,8 @@ val MEDIA_COLUMN_CNT = "media_column_cnt" val SHOW_ALL = "show_all" // display images and videos from all folders together val SHOW_MEDIA = "show_media" val SAVE_FOLDER_PREFIX = "folder_" +val HIDE_FOLDER_TOOLTIP_SHOWN = "hide_folder_tooltip_shown" +val EXCLUDE_FOLDER_TOOLTIP_SHOWN = "exclude_folder_tooltip_shown" val NOMEDIA = ".nomedia"