From ac462f5a3c6ecc86a3c6b2b7ed3012a114be4c78 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 12 Sep 2019 20:22:29 +0200 Subject: [PATCH] fetch the file name only when needed --- .../com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 96bb4e727..33621b58f 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 @@ -302,9 +302,9 @@ class MediaFetcher(val context: Context) { if (cursor.moveToFirst()) { do { try { - val path = cursor.getStringValue(MediaStore.Images.Media.DISPLAY_NAME) val dateTaken = cursor.getLongValue(MediaStore.Images.Media.DATE_TAKEN) if (dateTaken != 0L) { + val path = cursor.getStringValue(MediaStore.Images.Media.DISPLAY_NAME) dateTakens[path] = dateTaken } } catch (e: Exception) {