From d28b95290fb43fc6c650321f10d764b3b3d2b730 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 20 Apr 2018 14:54:34 +0200 Subject: [PATCH] remove the functions related to old checking if folder content changed --- .../gallery/activities/MainActivity.kt | 12 ------------ .../com/simplemobiletools/gallery/helpers/Config.kt | 6 ------ .../simplemobiletools/gallery/helpers/Constants.kt | 1 - 3 files changed, 19 deletions(-) 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 c017e10f3..8780134b3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -590,18 +590,6 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { } } - private fun checkFolderContentChange(newDirs: ArrayList) { - newDirs.forEach { - val storedShortDirValue = config.loadFolderMediaShort(it.path) - if (storedShortDirValue != it.toString()) { - config.saveFolderMediaShort(it.path, it.toString()) - if (storedShortDirValue.isNotEmpty()) { - updateStoredFolderItems(it.path) - } - } - } - } - private fun storeDirectories() { if (!config.temporarilyShowHidden && config.tempFolderPath.isEmpty()) { storeDirectoryItems(mDirs) 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 209ff4f6c..edb79a028 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt @@ -137,12 +137,6 @@ class Config(context: Context) : BaseConfig(context) { fun loadFolderMedia(path: String) = prefs.getString(SAVE_FOLDER_PREFIX + path, "") - fun saveFolderMediaShort(path: String, value: String) { - prefs.edit().putString(SAVE_FOLDER_SHORT_PREFIX + path, value).apply() - } - - fun loadFolderMediaShort(path: String) = prefs.getString(SAVE_FOLDER_SHORT_PREFIX + path, "") - var autoplayVideos: Boolean get() = prefs.getBoolean(AUTOPLAY_VIDEOS, false) set(autoplay) = prefs.edit().putBoolean(AUTOPLAY_VIDEOS, autoplay).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 37cf9c4c1..5dcbc4305 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt @@ -26,7 +26,6 @@ const val MEDIA_HORIZONTAL_COLUMN_CNT = "media_horizontal_column_cnt" const val MEDIA_LANDSCAPE_HORIZONTAL_COLUMN_CNT = "media_landscape_horizontal_column_cnt" const val SHOW_ALL = "show_all" // display images and videos from all folders together const val SAVE_FOLDER_PREFIX = "folder2_" -const val SAVE_FOLDER_SHORT_PREFIX = "folder_short_" const val HIDE_FOLDER_TOOLTIP_SHOWN = "hide_folder_tooltip_shown" const val EXCLUDED_FOLDERS = "excluded_folders" const val INCLUDED_FOLDERS = "included_folders"