Fix syncing crash when no archived media exists.

This commit is contained in:
Greyson Parrelli
2025-04-11 16:41:17 -04:00
committed by Cody Henthorne
parent 94d07f7012
commit 6525662071

View File

@@ -128,6 +128,10 @@ class BackupMediaSnapshotTable(context: Context, database: SignalDatabase) : Dat
* Given a list of media objects, find the ones that we have no knowledge of in our local store.
*/
fun getMediaObjectsThatCantBeFound(objects: List<ArchivedMediaObject>): Set<ArchivedMediaObject> {
if (objects.isEmpty()) {
return emptySet()
}
val query = SqlUtil.buildSingleCollectionQuery(
column = MEDIA_ID,
values = objects.map { it.mediaId },