Update remote backup size display to indicate loading while accessing data.

This commit is contained in:
Alex Hart
2025-08-11 09:24:07 -03:00
committed by Greyson Parrelli
parent 71a588da39
commit 9f7a78bf3c
3 changed files with 9 additions and 1 deletions

View File

@@ -906,6 +906,12 @@ private fun LazyListScope.appendBackupDetailsItems(
if (backupState !is BackupState.ActiveFree) {
item {
val sizeText = if (backupMediaSize < 0L) {
stringResource(R.string.RemoteBackupsSettingsFragment__loading)
} else {
backupMediaSize.bytes.toUnitString()
}
Rows.TextRow(text = {
Column {
Text(

View File

@@ -23,7 +23,7 @@ data class RemoteBackupsSettingsState(
val isOutOfStorageSpace: Boolean = false,
val totalAllowedStorageSpace: String = "",
val backupState: BackupState,
val backupMediaSize: Long = 0,
val backupMediaSize: Long = -1L,
val backupsFrequency: BackupFrequency = BackupFrequency.DAILY,
val lastBackupTimestamp: Long = 0,
val dialog: Dialog = Dialog.NONE,