mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-25 04:06:14 +00:00
Fix syncing crash when no archived media exists.
This commit is contained in:
committed by
Cody Henthorne
parent
94d07f7012
commit
6525662071
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user