From b81e1c2172b741d5d0ca46063cf9ea181f9fe7b3 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 20 Jun 2018 21:55:41 +0200 Subject: [PATCH] make sure we sort the Favorites properly --- .../simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 fcd89b099..9d5ff6a15 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt @@ -31,7 +31,9 @@ class GetMediaAsynctask(val context: Context, val mPath: String, val isPickImage media } else { if (mPath == FAVORITES) { - context.galleryDB.MediumDao().getFavorites() as ArrayList + val media = context.galleryDB.MediumDao().getFavorites() as ArrayList + mediaFetcher.sortMedia(media, context.config.getFileSorting(mPath)) + media } else { mediaFetcher.getFilesFrom(mPath, isPickImage, isPickVideo, getProperDateTaken, favoritePaths) }