diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index 907b3883b..e2c9649b9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -342,8 +342,10 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { } private fun storeDirectories() { - val directories = Gson().toJson(mDirs) - config.directories = directories + if (!config.temporarilyShowHidden) { + val directories = Gson().toJson(mDirs) + config.directories = directories + } } private fun setupAdapter() { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index 3c9fab44c..f3b861a9b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -399,9 +399,11 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { } private fun storeFolder() { - val subList = mMedia.subList(0, Math.min(SAVE_MEDIA_CNT, mMedia.size)) - val json = Gson().toJson(subList) - config.saveFolderMedia(mPath, json) + if (!config.temporarilyShowHidden) { + val subList = mMedia.subList(0, Math.min(SAVE_MEDIA_CNT, mMedia.size)) + val json = Gson().toJson(subList) + config.saveFolderMedia(mPath, json) + } } override fun deleteFiles(files: ArrayList) {