mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Prevent "Free" tier from being upgraded in the background.
This commit is contained in:
@@ -169,7 +169,7 @@ private fun BackupsSettingsContent(
|
||||
OtherWaysToBackUpHeading()
|
||||
}
|
||||
|
||||
is BackupState.ActiveFree, is BackupState.ActivePaid -> {
|
||||
is BackupState.ActiveFree, is BackupState.ActivePaid, is BackupState.Canceled -> {
|
||||
ActiveBackupsRow(
|
||||
backupState = backupsSettingsState.backupState,
|
||||
onBackupsRowClick = onBackupsRowClick,
|
||||
@@ -210,15 +210,6 @@ private fun BackupsSettingsContent(
|
||||
OtherWaysToBackUpHeading()
|
||||
}
|
||||
|
||||
is BackupState.Canceled -> {
|
||||
ActiveBackupsRow(
|
||||
backupState = backupsSettingsState.backupState,
|
||||
lastBackupAt = backupsSettingsState.lastBackupAt
|
||||
)
|
||||
|
||||
OtherWaysToBackUpHeading()
|
||||
}
|
||||
|
||||
is BackupState.SubscriptionMismatchMissingGooglePlay -> {
|
||||
ActiveBackupsRow(
|
||||
backupState = backupsSettingsState.backupState,
|
||||
@@ -421,13 +412,25 @@ private fun ActiveBackupsRow(
|
||||
|
||||
when (val type = backupState.messageBackupsType) {
|
||||
is MessageBackupsType.Paid -> {
|
||||
Text(
|
||||
text = stringResource(
|
||||
val body = if (backupState is BackupState.Canceled) {
|
||||
stringResource(R.string.BackupsSettingsFragment__subscription_canceled)
|
||||
} else {
|
||||
stringResource(
|
||||
R.string.BackupsSettingsFragment_s_month_renews_s,
|
||||
FiatMoneyUtil.format(LocalContext.current.resources, type.pricePerMonth),
|
||||
DateUtils.formatDateWithYear(Locale.getDefault(), backupState.renewalTime.inWholeMilliseconds)
|
||||
),
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
}
|
||||
|
||||
val color = if (backupState is BackupState.Canceled) {
|
||||
MaterialTheme.colorScheme.error
|
||||
} else {
|
||||
MaterialTheme.colorScheme.onSurfaceVariant
|
||||
}
|
||||
|
||||
Text(
|
||||
text = body,
|
||||
color = color,
|
||||
style = MaterialTheme.typography.bodyMedium
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user