From 567bf0faccea3b9b7950d376d264f40088d6f323 Mon Sep 17 00:00:00 2001 From: Alex Hart Date: Thu, 26 Mar 2026 12:30:40 -0300 Subject: [PATCH] Add Last Backup help text. --- .../local/LocalBackupsSettingsScreen.kt | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/backups/local/LocalBackupsSettingsScreen.kt b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/backups/local/LocalBackupsSettingsScreen.kt index 276e2b25a0..59bf297327 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/backups/local/LocalBackupsSettingsScreen.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/backups/local/LocalBackupsSettingsScreen.kt @@ -141,12 +141,14 @@ internal fun LocalBackupsSettingsScreen( color = MaterialTheme.colorScheme.onSurface ) - Text( - text = state.lastBackupLabel.orEmpty(), - style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.onSurfaceVariant, - modifier = Modifier.padding(top = 4.dp) - ) + if (state.lastBackupLabel != null) { + Text( + text = stringResource(R.string.BackupsSettingsFragment_last_backup_s, state.lastBackupLabel), + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.padding(top = 4.dp) + ) + } } }, onClick = callback::onCreateBackupClick @@ -270,7 +272,7 @@ private fun LocalBackupsSettingsEnabledIdlePreview() { LocalBackupsSettingsScreen( state = LocalBackupsSettingsState( backupsEnabled = true, - lastBackupLabel = "Last backup: 1 hour ago", + lastBackupLabel = "1 hour ago", folderDisplayName = "/storage/emulated/0/Signal/Backups", scheduleTimeLabel = "1:00 AM", progress = LocalBackupCreationProgress(idle = LocalBackupCreationProgress.Idle()) @@ -287,7 +289,7 @@ private fun LocalBackupsSettingsEnabledExportingIndeterminatePreview() { LocalBackupsSettingsScreen( state = LocalBackupsSettingsState( backupsEnabled = true, - lastBackupLabel = "Last backup: 1 hour ago", + lastBackupLabel = "1 hour ago", folderDisplayName = "/storage/emulated/0/Signal/Backups", scheduleTimeLabel = "1:00 AM", progress = LocalBackupCreationProgress( @@ -306,7 +308,7 @@ private fun LocalBackupsSettingsEnabledExportingMessagesPreview() { LocalBackupsSettingsScreen( state = LocalBackupsSettingsState( backupsEnabled = true, - lastBackupLabel = "Last backup: 1 hour ago", + lastBackupLabel = "1 hour ago", folderDisplayName = "/storage/emulated/0/Signal/Backups", scheduleTimeLabel = "1:00 AM", progress = LocalBackupCreationProgress( @@ -329,7 +331,7 @@ private fun LocalBackupsSettingsEnabledTransferringPreview() { LocalBackupsSettingsScreen( state = LocalBackupsSettingsState( backupsEnabled = true, - lastBackupLabel = "Last backup: 1 hour ago", + lastBackupLabel = "1 hour ago", folderDisplayName = "/storage/emulated/0/Signal/Backups", scheduleTimeLabel = "1:00 AM", progress = LocalBackupCreationProgress( @@ -352,7 +354,7 @@ private fun LocalBackupsSettingsEnabledNonLegacyPreview() { LocalBackupsSettingsScreen( state = LocalBackupsSettingsState( backupsEnabled = true, - lastBackupLabel = "Last backup: 1 hour ago", + lastBackupLabel = "1 hour ago", folderDisplayName = "Signal Backups", scheduleTimeLabel = "1:00 AM", progress = LocalBackupCreationProgress(idle = LocalBackupCreationProgress.Idle())