Implement stop/resume media restore and update restore over cellular.

This commit is contained in:
Cody Henthorne
2025-05-05 19:51:36 -04:00
committed by Michelle Tang
parent 9867fa3f50
commit 93403a0d2c
15 changed files with 183 additions and 46 deletions

View File

@@ -555,6 +555,15 @@ class AttachmentTable(
.readToSingleLong()
}
fun getOptimizedMediaAttachmentSize(): Long {
return readableDatabase
.select("SUM($DATA_SIZE)")
.from(TABLE_NAME)
.where("$TRANSFER_STATE = ?", TRANSFER_RESTORE_OFFLOADED)
.run()
.readToSingleLong()
}
/**
* Finds all of the attachmentIds of attachments that need to be uploaded to the archive cdn.
*/