diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt index 5ac44db95..632544e80 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt @@ -872,12 +872,12 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { mLatestMediaDateId = getLatestMediaByDateId() if (!isFromCache) { val mediaToInsert = (mMedia).filter { it is Medium && it.deletedTS == 0L }.map { it as Medium } - try { - Thread { + Thread { + try { mediaDB.insertAll(mediaToInsert) - }.start() - } catch (e: Exception) { - } + } catch (e: Exception) { + } + }.start() } }