fetch the file name only when needed

This commit is contained in:
tibbi 2019-09-12 20:22:29 +02:00
parent af3b4e46f0
commit ac462f5a3c

View file

@ -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) {