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 5002bf781..9f10cbaa1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt @@ -316,8 +316,4 @@ class Config(context: Context) : BaseConfig(context) { var extendedDetails: Int get() = prefs.getInt(EXTENDED_DETAILS, EXT_RESOLUTION or EXT_LAST_MODIFIED or EXT_EXIF_PROPERTIES) set(extendedDetails) = prefs.edit().putInt(EXTENDED_DETAILS, extendedDetails).apply() - - var lastFileCleanup: Long - get() = prefs.getLong(LAST_FILE_CLEANUP, 0L) - set(lastFileCleanup) = prefs.edit().putLong(LAST_FILE_CLEANUP, lastFileCleanup).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 9d0e35873..33a95e350 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt @@ -43,7 +43,6 @@ const val VIEW_TYPE_FILES = "view_type_files" const val SHOW_EXTENDED_DETAILS = "show_extended_details" const val EXTENDED_DETAILS = "extended_details" const val HIDE_EXTENDED_DETAILS = "hide_extended_details" -const val LAST_FILE_CLEANUP = "last_file_cleanup" const val ONE_FINGER_ZOOM = "one_finger_zoom" const val ALLOW_INSTANT_CHANGE = "allow_instant_change" const val REPLACE_ZOOMABLE_IMAGES = "replace_zoomable_images" diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt index e0e797f0f..f941b8f03 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt @@ -40,19 +40,6 @@ class MediaFetcher(val context: Context) { directories.remove(it) } - Thread { - val ONE_WEEK = 7 * 24 * 60 * 60 * 1000 - if (System.currentTimeMillis() - context.config.lastFileCleanup > ONE_WEEK) { - media.forEach { - val file = File(it.path) - if (!it.path.contains("/.thumbnails") && !file.exists() && file.length() == 0L) { - context.deleteFromMediaStore(file) - } - } - context.config.lastFileCleanup = System.currentTimeMillis() - } - }.start() - return directories }