From cd75718d56b0491769c15361689da12ca9463f4b Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 1 Oct 2017 09:16:31 +0200 Subject: [PATCH] try adding missing media files in the mediastore by scanning it --- .../com/simplemobiletools/gallery/helpers/MediaFetcher.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt index 210e44258..ac3178dc7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt @@ -270,8 +270,10 @@ class MediaFetcher(val context: Context) { val medium = Medium(filename, file.absolutePath, isVideo, dateModified, dateTaken, size) val isAlreadyAdded = curMedia.any { it.path == file.absolutePath } - if (!isAlreadyAdded) + if (!isAlreadyAdded) { curMedia.add(medium) + context.scanPath(file.absolutePath) {} + } } }