make sure we sort the Favorites properly

This commit is contained in:
tibbi 2018-06-20 21:55:41 +02:00
parent d4fe872a3a
commit b81e1c2172

View file

@ -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<Medium>
val media = context.galleryDB.MediumDao().getFavorites() as ArrayList<Medium>
mediaFetcher.sortMedia(media, context.config.getFileSorting(mPath))
media
} else {
mediaFetcher.getFilesFrom(mPath, isPickImage, isPickVideo, getProperDateTaken, favoritePaths)
}