From 06da09377dee6523183558d81a93c3c430a5a42a Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 15 Feb 2019 21:08:48 +0100 Subject: [PATCH] use proper Date Taken if it is used at Group by too, not just at sorting --- .../gallery/pro/asynctasks/GetMediaAsynctask.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/asynctasks/GetMediaAsynctask.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/asynctasks/GetMediaAsynctask.kt index 7801c40e5..ed3035ac0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/asynctasks/GetMediaAsynctask.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/asynctasks/GetMediaAsynctask.kt @@ -5,10 +5,7 @@ import android.os.AsyncTask import com.simplemobiletools.commons.helpers.SORT_BY_DATE_TAKEN import com.simplemobiletools.gallery.pro.extensions.config import com.simplemobiletools.gallery.pro.extensions.getFavoritePaths -import com.simplemobiletools.gallery.pro.helpers.FAVORITES -import com.simplemobiletools.gallery.pro.helpers.MediaFetcher -import com.simplemobiletools.gallery.pro.helpers.RECYCLE_BIN -import com.simplemobiletools.gallery.pro.helpers.SHOW_ALL +import com.simplemobiletools.gallery.pro.helpers.* import com.simplemobiletools.gallery.pro.models.Medium import com.simplemobiletools.gallery.pro.models.ThumbnailItem import java.util.* @@ -20,7 +17,7 @@ class GetMediaAsynctask(val context: Context, val mPath: String, val isPickImage override fun doInBackground(vararg params: Void): ArrayList { val pathToUse = if (showAll) SHOW_ALL else mPath - val getProperDateTaken = context.config.getFileSorting(pathToUse) and SORT_BY_DATE_TAKEN != 0 + val getProperDateTaken = context.config.getFileSorting(pathToUse) and SORT_BY_DATE_TAKEN != 0 || context.config.getFolderGrouping(pathToUse) and GROUP_BY_DATE_TAKEN != 0 val favoritePaths = context.getFavoritePaths() val getVideoDurations = context.config.showThumbnailVideoDuration val media = if (showAll) {