Use trailing job to clear media restore progress.

This commit is contained in:
Cody Henthorne
2024-09-05 14:18:04 -04:00
parent 390ea341ca
commit 2701b570bb
6 changed files with 92 additions and 14 deletions

View File

@@ -79,10 +79,6 @@ class MediaRestoreProgressBanner(private val data: MediaRestoreEvent) : Banner()
val remainingAttachmentSize = SignalDatabase.attachments.getRemainingRestorableAttachmentSize()
val completedBytes = totalRestoreSize - remainingAttachmentSize
if (remainingAttachmentSize == 0L) {
SignalStore.backup.totalRestorableAttachmentSize = 0
}
MediaRestoreEvent(completedBytes, totalRestoreSize)
}
}