commit | 48e26f8d6e463e94bde0482794c23bf874e7a436 | [log] [tgz] |
---|---|---|
author | Sebastiano Barezzi <seba@sebaubuntu.dev> | Wed Jan 31 03:06:12 2024 +0100 |
committer | Sebastiano Barezzi <seba@sebaubuntu.dev> | Wed Jan 31 03:48:06 2024 +0100 |
tree | c7db6cc7701e9ed7f5b02a20541aec13c9463027 | |
parent | d71b730f6266f98701d713ff1e609726fa2a9851 [diff] |
Glimpse: AlbumFlow: Match MediaFlow order Change-Id: I9dd113388e18097dfba69dc7130c70b7b5c24c5d
diff --git a/app/src/main/java/org/lineageos/glimpse/flow/AlbumFlow.kt b/app/src/main/java/org/lineageos/glimpse/flow/AlbumFlow.kt index fc63752..a47b37f 100644 --- a/app/src/main/java/org/lineageos/glimpse/flow/AlbumFlow.kt +++ b/app/src/main/java/org/lineageos/glimpse/flow/AlbumFlow.kt
@@ -75,7 +75,12 @@ rawMimeType, ).toTypedArray() - val sortOrder = "${MediaStore.Files.FileColumns.DATE_ADDED} DESC" + val sortOrder = when (bucketId) { + MediaStoreBuckets.MEDIA_STORE_BUCKET_TRASH.id -> + "${MediaStore.Files.FileColumns.DATE_EXPIRES} DESC" + + else -> "${MediaStore.Files.FileColumns.DATE_ADDED} DESC" + } val queryArgs = Bundle().apply { putAll(