mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 04:58:45 +00:00
Display resume over cellular only if awaiting wifi.
This commit is contained in:
committed by
Cody Henthorne
parent
26b6019b28
commit
cf0dfdceb1
@@ -656,14 +656,19 @@ private fun LazyListScope.appendRestoreFromBackupStatusData(
|
||||
item {
|
||||
BackupStatusRow(
|
||||
backupStatusData = backupRestoreState.backupStatusData,
|
||||
restoreType = RestoreType.DOWNLOAD,
|
||||
restoreType = if (isCancelable) RestoreType.DOWNLOAD else RestoreType.RESTORE,
|
||||
onCancelClick = if (isCancelable) contentCallbacks::onCancelMediaRestore else null,
|
||||
onSkipClick = contentCallbacks::onDisplaySkipMediaRestoreProtectionDialog,
|
||||
onLearnMoreClick = contentCallbacks::onLearnMoreAboutBackupFailure
|
||||
)
|
||||
}
|
||||
|
||||
if (!canRestoreUsingCellular) {
|
||||
val displayResumeButton = when (val data = backupRestoreState.backupStatusData) {
|
||||
is BackupStatusData.RestoringMedia -> !canRestoreUsingCellular && data.restoreStatus == BackupStatusData.RestoreStatus.WAITING_FOR_WIFI
|
||||
else -> false
|
||||
}
|
||||
|
||||
if (displayResumeButton) {
|
||||
item {
|
||||
Rows.TextRow(
|
||||
text = stringResource(R.string.RemoteBackupsSettingsFragment__resume_download),
|
||||
|
||||
Reference in New Issue
Block a user