check new media every couple seconds

This commit is contained in:
tibbi 2018-04-26 15:42:14 +02:00
parent d83df54a41
commit a0cf205c8c

View file

@ -662,6 +662,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
mIsGettingDirs = false
mLoadedInitialPhotos = true
checkLastMediaChanged()
runOnUiThread {
directories_refresh_layout.isRefreshing = false
@ -795,7 +796,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
return
}
/*mLastMediaHandler.postDelayed({
mLastMediaHandler.postDelayed({
Thread {
val mediaId = getLatestMediaId()
val mediaDateId = getLatestMediaByDateId()
@ -810,7 +811,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
checkLastMediaChanged()
}
}.start()
}, LAST_MEDIA_CHECK_PERIOD)*/
}, LAST_MEDIA_CHECK_PERIOD)
}
override fun refreshItems() {