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