Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mobile][photos] remove duplicate trash predicate

Priyanshu Dangare20a3459159d4
diff --git a/mobile/apps/photos/plugins/ente_photos_platform/android/src/main/kotlin/io/ente/photos/platform/devicetrash/DeviceTrashService.kt b/mobile/apps/photos/plugins/ente_photos_platform/android/src/main/kotlin/io/ente/photos/platform/devicetrash/DeviceTrashService.kt
index ec0654b93f..69a1650a19 100644
--- a/mobile/apps/photos/plugins/ente_photos_platform/android/src/main/kotlin/io/ente/photos/platform/devicetrash/DeviceTrashService.kt
+++ b/mobile/apps/photos/plugins/ente_photos_platform/android/src/main/kotlin/io/ente/photos/platform/devicetrash/DeviceTrashService.kt
@@ -53,16 +53,15 @@ internal class DeviceTrashService(context: Context) {
MediaStore.MediaColumns.DATE_EXPIRES,
MediaStore.Images.Media.BUCKET_DISPLAY_NAME,
)
- val selection =
- "${MediaStore.MediaColumns.IS_TRASHED} = ? AND " +
- "${MediaStore.Files.FileColumns.MEDIA_TYPE} IN (?, ?)"
val queryArgs =
Bundle().apply {
- putString(ContentResolver.QUERY_ARG_SQL_SELECTION, selection)
+ putString(
+ ContentResolver.QUERY_ARG_SQL_SELECTION,
+ "${MediaStore.Files.FileColumns.MEDIA_TYPE} IN (?, ?)",
+ )
putStringArray(
ContentResolver.QUERY_ARG_SQL_SELECTION_ARGS,
arrayOf(
- "1",
MediaStore.Files.FileColumns.MEDIA_TYPE_IMAGE.toString(),
MediaStore.Files.FileColumns.MEDIA_TYPE_VIDEO.toString(),
),