From ad049ecb0bc0a41ebcb880e9e05d2a51c519a0dc Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 24 Oct 2020 10:06:21 +0200 Subject: [PATCH] wrap Date Taken value fetching in try/catch block --- .../gallery/pro/helpers/MediaFetcher.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt index 9eb25e98f..ef2a6c52a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt @@ -487,15 +487,15 @@ class MediaFetcher(val context: Context) { } catch (e: Exception) { } } + + val dateTakenValues = context.dateTakensDB.getAllDateTakens() + + dateTakenValues.forEach { + dateTakens[it.fullPath] = it.taken + } } catch (e: Exception) { } - val dateTakenValues = context.dateTakensDB.getAllDateTakens() - - dateTakenValues.forEach { - dateTakens[it.fullPath] = it.taken - } - return dateTakens }