Include last proto size in internal settion of backups settings.

This commit is contained in:
Cody Henthorne
2025-09-10 16:28:53 -04:00
parent 148cf63a92
commit b39d562d56
3 changed files with 5 additions and 2 deletions

View File

@@ -850,6 +850,7 @@ private fun LazyListScope.appendBackupDetailsItems(
Text("[Internal Only] Backup Media Details")
Text("Awaiting Restore: ${state.backupMediaDetails.awaitingRestore.toUnitString()}")
Text("Offloaded: ${state.backupMediaDetails.offloaded.toUnitString()}")
Text("Last Proto Size: ${state.backupMediaDetails.protoFileSize.toUnitString()}")
}
}
}

View File

@@ -36,7 +36,8 @@ data class RemoteBackupsSettingsState(
data class BackupMediaDetails(
val awaitingRestore: ByteSize,
val offloaded: ByteSize
val offloaded: ByteSize,
val protoFileSize: ByteSize
)
enum class Dialog {

View File

@@ -263,7 +263,8 @@ class RemoteBackupsSettingsViewModel : ViewModel() {
backupMediaDetails = if (RemoteConfig.internalUser || Environment.IS_STAGING) {
RemoteBackupsSettingsState.BackupMediaDetails(
awaitingRestore = SignalDatabase.attachments.getRemainingRestorableAttachmentSize().bytes,
offloaded = SignalDatabase.attachments.getOptimizedMediaAttachmentSize().bytes
offloaded = SignalDatabase.attachments.getOptimizedMediaAttachmentSize().bytes,
protoFileSize = SignalStore.backup.lastBackupProtoSize.bytes
)
} else null
)