From a0cf205c8c6c9ecd6fe670610a396f515787b21f Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 26 Apr 2018 15:42:14 +0200 Subject: [PATCH] check new media every couple seconds --- .../com/simplemobiletools/gallery/activities/MainActivity.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 5d27d06a1..9bbaa26b3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -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() {