mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Improve archive restore progress tracking and UX.
This commit is contained in:
committed by
Greyson Parrelli
parent
89a0541574
commit
1f40c7ab7e
@@ -13,8 +13,7 @@ import org.signal.core.util.logging.Log
|
||||
import org.thoughtcrime.securesms.MainActivity
|
||||
import org.thoughtcrime.securesms.R
|
||||
import org.thoughtcrime.securesms.backup.RestoreState
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore
|
||||
import org.thoughtcrime.securesms.backup.v2.ArchiveRestoreProgress
|
||||
import org.thoughtcrime.securesms.notifications.NotificationChannels
|
||||
import org.thoughtcrime.securesms.notifications.NotificationIds
|
||||
import org.thoughtcrime.securesms.service.BackupMediaRestoreService.Companion.hasTimedOut
|
||||
@@ -176,12 +175,10 @@ class BackupMediaRestoreService : SafeForegroundService() {
|
||||
|
||||
val title: String = startingTitle
|
||||
val downloadedBytes: ByteSize
|
||||
get() {
|
||||
val remainingAttachmentSize = SignalDatabase.attachments.getRemainingRestorableAttachmentSize()
|
||||
return totalBytes - remainingAttachmentSize.bytes
|
||||
}
|
||||
get() = ArchiveRestoreProgress.state.completedRestoredSize
|
||||
|
||||
val totalBytes: ByteSize
|
||||
get() = SignalStore.backup.totalRestorableAttachmentSize.bytes
|
||||
get() = ArchiveRestoreProgress.state.totalRestoreSize
|
||||
|
||||
fun closeFromTimeout() {
|
||||
controllerLock.withLock {
|
||||
|
||||
Reference in New Issue
Block a user