diff --git a/app/build.gradle b/app/build.gradle index 51940dcf9..8722da5bc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -47,7 +47,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:4.4.21' + implementation 'com.simplemobiletools:commons:4.4.24' implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0' implementation 'com.android.support:multidex:1.0.3' implementation 'it.sephiroth.android.exif:library:1.0.1' 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 cf0b1aa63..93d0608df 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt @@ -2,6 +2,7 @@ package com.simplemobiletools.gallery.helpers import android.content.Context import android.content.res.Configuration +import android.os.Environment import com.google.gson.Gson import com.google.gson.reflect.TypeToken import com.simplemobiletools.commons.helpers.BaseConfig @@ -367,6 +368,12 @@ class Config(context: Context) : BaseConfig(context) { // if a user hides a folder, then enables temporary hidden folder displaying, make sure we show it properly var everShownFolders: Set - get() = prefs.getStringSet(EVER_SHOWN_FOLDERS, HashSet()) + get() = prefs.getStringSet(EVER_SHOWN_FOLDERS, getEverShownFolders()) set(everShownFolders) = prefs.edit().putStringSet(EVER_SHOWN_FOLDERS, everShownFolders).apply() + + fun getEverShownFolders() = hashSetOf( + internalStoragePath, + Environment.DIRECTORY_DCIM, + Environment.DIRECTORY_PICTURES + ) }