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 fa1c11de6..d13e162f3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -679,7 +679,6 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { return } - mLastMediaHandler.removeCallbacksAndMessages(null) mLastMediaHandler.postDelayed({ Thread { val mediaId = getLatestMediaId() @@ -691,6 +690,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { getDirectories() } } else { + mLastMediaHandler.removeCallbacksAndMessages(null) checkLastMediaChanged() } }.start()