From fa201e65245eb7b59905d4acf76aad08f7e4293b Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 15 Mar 2018 23:16:12 +0100 Subject: [PATCH] avoid 2 checkLastMediaChanged reseting each other --- .../com/simplemobiletools/gallery/activities/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()