From 6325121969ba10af76796c22666aebc4855180c2 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 16 Sep 2020 21:09:10 +0200 Subject: [PATCH] fix #1913, prefer the Last Modified value from mediastore, not our db --- app/build.gradle | 2 +- .../com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 63b21dd02..d6a16cb22 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -77,7 +77,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.30.4' + implementation 'com.simplemobiletools:commons:5.30.5' implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0' implementation 'it.sephiroth.android.exif:library:1.0.1' implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.19' 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 487b23293..135dae0a1 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 @@ -486,7 +486,9 @@ class MediaFetcher(val context: Context) { } lastModifiedValues.forEach { - lastModifieds[it.fullPath] = it.taken + if (!lastModifieds.containsKey(it.fullPath)) { + lastModifieds[it.fullPath] = it.lastModified + } } return lastModifieds