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 756273df9..53a70a411 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -527,9 +527,11 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { } private fun gotDirectories(newDirs: ArrayList, isFromCache: Boolean) { - Thread { - mLatestMediaId = getLatestMediaId() - }.start() + if (!isFromCache) { + Thread { + mLatestMediaId = getLatestMediaId() + }.start() + } val dirs = getSortedDirectories(newDirs) directories_refresh_layout.isRefreshing = false