Glimpse: Don't include trashed medias in albums

Change-Id: Ie447b3770471c53e44d04cfde12e41f295d94b0e
This commit is contained in:
Sebastiano Barezzi 2023-08-08 03:24:44 +02:00
parent 79a420286d
commit 7c701c0125
No known key found for this signature in database
GPG Key ID: 763BD3AE91A7A13F
1 changed files with 4 additions and 4 deletions

View File

@ -145,13 +145,13 @@ class AlbumsFragment : Fragment(), LoaderManager.LoaderCallbacks<Cursor> {
}
val bucketIds = listOfNotNull(
cursor.getInt(bucketIdIndex),
when (cursor.getInt(isTrashedIndex)) {
1 -> MediaStoreBuckets.MEDIA_STORE_BUCKET_TRASH.id
else -> cursor.getInt(bucketIdIndex)
},
MediaStoreBuckets.MEDIA_STORE_BUCKET_FAVORITES.id.takeIf {
cursor.getInt(isFavoriteIndex) == 1
},
MediaStoreBuckets.MEDIA_STORE_BUCKET_TRASH.id.takeIf {
cursor.getInt(isTrashedIndex) == 1
}
)
for (bucketId in bucketIds) {