From ddb8c98f0d91b0294bf0cf787f42a1b73e1797b4 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 19 Jun 2018 21:42:02 +0200 Subject: [PATCH] properly retrieve date_taken from media files when appropriate --- app/build.gradle | 2 +- .../simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f5b33e2e4..a0d0cfbed 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -47,7 +47,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:4.2.5' + implementation 'com.simplemobiletools:commons:4.2.6' implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0' implementation 'com.android.support:multidex:1.0.3' implementation 'it.sephiroth.android.exif:library:1.0.1' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt index 1f03be404..7f245c98a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt @@ -3,7 +3,6 @@ package com.simplemobiletools.gallery.asynctasks import android.content.Context import android.os.AsyncTask import com.simplemobiletools.commons.helpers.SORT_BY_DATE_TAKEN -import com.simplemobiletools.commons.models.FileDirItem.Companion.sorting import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.helpers.MediaFetcher import com.simplemobiletools.gallery.models.Medium @@ -15,7 +14,7 @@ class GetMediaAsynctask(val context: Context, val mPath: String, val isPickImage private val mediaFetcher = MediaFetcher(context) override fun doInBackground(vararg params: Void): ArrayList { - val getProperDateTaken = sorting and SORT_BY_DATE_TAKEN != 0 + val getProperDateTaken = context.config.getFileSorting(mPath) and SORT_BY_DATE_TAKEN != 0 return if (showAll) { val foldersToScan = mediaFetcher.getFoldersToScan() val media = ArrayList()