avoid 2 checkLastMediaChanged reseting each other

This commit is contained in:
tibbi 2018-03-15 23:16:12 +01:00
parent e68392b1e4
commit fa201e6524

View file

@ -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()