mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 20:48:43 +00:00
Replace message-backups TODO with backups.
This commit is contained in:
@@ -114,12 +114,12 @@ class BackupAlertBottomSheet : ComposeBottomSheetDialogFragment() {
|
||||
private fun performSecondaryAction() {
|
||||
when (backupAlert) {
|
||||
BackupAlert.COULD_NOT_COMPLETE_BACKUP -> {
|
||||
// TODO [message-backups] - Dismiss and notify later
|
||||
// TODO [backups] - Dismiss and notify later
|
||||
}
|
||||
|
||||
BackupAlert.PAYMENT_PROCESSING -> Unit
|
||||
BackupAlert.MEDIA_BACKUPS_ARE_OFF -> {
|
||||
// TODO [message-backups] - Silence and remind on last day
|
||||
// TODO [backups] - Silence and remind on last day
|
||||
}
|
||||
|
||||
BackupAlert.MEDIA_WILL_BE_DELETED_TODAY -> {
|
||||
@@ -144,7 +144,7 @@ class BackupAlertBottomSheet : ComposeBottomSheetDialogFragment() {
|
||||
}
|
||||
|
||||
private fun performFullMediaDownload() {
|
||||
// TODO [message-backups] -- We need to force this to download everything
|
||||
// TODO [backups] -- We need to force this to download everything
|
||||
AppDependencies.jobManager.add(BackupRestoreMediaJob())
|
||||
}
|
||||
}
|
||||
@@ -208,15 +208,15 @@ private fun BackupAlertSheetContent(
|
||||
|
||||
when (backupAlert) {
|
||||
BackupAlert.COULD_NOT_COMPLETE_BACKUP -> CouldNotCompleteBackup(
|
||||
daysSinceLastBackup = 7 // TODO [message-backups]
|
||||
daysSinceLastBackup = 7 // TODO [backups]
|
||||
)
|
||||
|
||||
BackupAlert.PAYMENT_PROCESSING -> PaymentProcessingBody()
|
||||
BackupAlert.MEDIA_BACKUPS_ARE_OFF -> MediaBackupsAreOffBody(30) // TODO [message-backups] -- Get this value from backend
|
||||
BackupAlert.MEDIA_BACKUPS_ARE_OFF -> MediaBackupsAreOffBody(30) // TODO [backups] -- Get this value from backend
|
||||
BackupAlert.MEDIA_WILL_BE_DELETED_TODAY -> MediaWillBeDeletedTodayBody()
|
||||
BackupAlert.DISK_FULL -> DiskFullBody(
|
||||
requiredSpace = "12 GB", // TODO [message-backups] Where does this value come from?
|
||||
daysUntilDeletion = 30 // TODO [message-backups] Where does this value come from?
|
||||
requiredSpace = "12 GB", // TODO [backups] Where does this value come from?
|
||||
daysUntilDeletion = 30 // TODO [backups] Where does this value come from?
|
||||
)
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ private fun DiskFullBody(
|
||||
)
|
||||
|
||||
Text(
|
||||
text = pluralStringResource(id = R.plurals.BackupAlertBottomSheet__if_you_choose_skip, daysUntilDeletion.toInt(), daysUntilDeletion), // TODO [message-backups] Learn More link
|
||||
text = pluralStringResource(id = R.plurals.BackupAlertBottomSheet__if_you_choose_skip, daysUntilDeletion.toInt(), daysUntilDeletion), // TODO [backups] Learn More link
|
||||
textAlign = TextAlign.Center,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
modifier = Modifier.padding(bottom = 36.dp)
|
||||
@@ -349,7 +349,7 @@ private fun primaryActionString(
|
||||
pricePerMonth: String
|
||||
): String {
|
||||
return when (backupAlert) {
|
||||
BackupAlert.COULD_NOT_COMPLETE_BACKUP -> stringResource(android.R.string.ok) // TODO [message-backups] -- Finalized copy
|
||||
BackupAlert.COULD_NOT_COMPLETE_BACKUP -> stringResource(android.R.string.ok) // TODO [backups] -- Finalized copy
|
||||
BackupAlert.PAYMENT_PROCESSING -> stringResource(R.string.BackupAlertBottomSheet__manage_subscription)
|
||||
BackupAlert.MEDIA_BACKUPS_ARE_OFF -> stringResource(R.string.BackupAlertBottomSheet__subscribe_for_s_month, pricePerMonth)
|
||||
BackupAlert.MEDIA_WILL_BE_DELETED_TODAY -> stringResource(R.string.BackupAlertBottomSheet__download_media_now)
|
||||
@@ -361,7 +361,7 @@ private fun primaryActionString(
|
||||
private fun rememberSecondaryActionResource(backupAlert: BackupAlert): Int {
|
||||
return remember(backupAlert) {
|
||||
when (backupAlert) {
|
||||
BackupAlert.COULD_NOT_COMPLETE_BACKUP -> android.R.string.cancel // TODO [message-backups] -- Finalized copy
|
||||
BackupAlert.COULD_NOT_COMPLETE_BACKUP -> android.R.string.cancel // TODO [backups] -- Finalized copy
|
||||
BackupAlert.PAYMENT_PROCESSING -> R.string.BackupAlertBottomSheet__not_now
|
||||
BackupAlert.MEDIA_BACKUPS_ARE_OFF -> R.string.BackupAlertBottomSheet__not_now
|
||||
BackupAlert.MEDIA_WILL_BE_DELETED_TODAY -> R.string.BackupAlertBottomSheet__dont_download_media
|
||||
|
||||
@@ -19,7 +19,7 @@ object BackupAlertDelegate {
|
||||
fun delegate(fragmentManager: FragmentManager, lifecycle: Lifecycle) {
|
||||
lifecycle.coroutineScope.launch {
|
||||
lifecycle.repeatOnLifecycle(Lifecycle.State.RESUMED) {
|
||||
// TODO [message-backups]
|
||||
// TODO [backups]
|
||||
// 1. Get unnotified backup upload failures
|
||||
// 2. Get unnotified backup download failures
|
||||
// 3. Get unnotified backup payment failures
|
||||
|
||||
@@ -60,7 +60,7 @@ class GatewaySelectorBottomSheet : DSLSettingsBottomSheetFragment() {
|
||||
|
||||
private fun getConfiguration(state: GatewaySelectorState): DSLConfiguration {
|
||||
return configure {
|
||||
// TODO [message-backups] -- No badge on message backups.
|
||||
// TODO [backups] -- No badge on message backups.
|
||||
customPref(
|
||||
BadgeDisplay112.Model(
|
||||
badge = state.inAppPayment.data.badge!!.let { Badges.fromDatabaseBadge(it) },
|
||||
@@ -209,7 +209,7 @@ class GatewaySelectorBottomSheet : DSLSettingsBottomSheetFragment() {
|
||||
fun DSLConfiguration.presentTitleAndSubtitle(context: Context, inAppPayment: InAppPaymentTable.InAppPayment) {
|
||||
when (inAppPayment.type) {
|
||||
InAppPaymentType.UNKNOWN -> error("Unsupported type UNKNOWN")
|
||||
InAppPaymentType.RECURRING_BACKUP -> error("This type is not supported") // TODO [message-backups] necessary?
|
||||
InAppPaymentType.RECURRING_BACKUP -> error("This type is not supported") // TODO [backups] necessary?
|
||||
InAppPaymentType.RECURRING_DONATION -> presentMonthlyText(context, inAppPayment)
|
||||
InAppPaymentType.ONE_TIME_DONATION -> presentOneTimeText(context, inAppPayment)
|
||||
InAppPaymentType.ONE_TIME_GIFT -> presentGiftText(context, inAppPayment)
|
||||
|
||||
@@ -70,7 +70,7 @@ class PayPalPaymentInProgressFragment : DialogFragment(R.layout.donation_in_prog
|
||||
}
|
||||
|
||||
InAppPaymentProcessorAction.CANCEL_SUBSCRIPTION -> {
|
||||
viewModel.cancelSubscription(InAppPaymentSubscriberRecord.Type.DONATION) // TODO [message-backups] Remove hardcode
|
||||
viewModel.cancelSubscription(InAppPaymentSubscriberRecord.Type.DONATION) // TODO [backups] Remove hardcode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,8 +99,8 @@ class DonationErrorParams<V> private constructor(
|
||||
)
|
||||
|
||||
else -> DonationErrorParams(
|
||||
title = R.string.DonationsErrors__couldnt_add_badge, // TODO [message-backups] -- This will need a backups-specific string
|
||||
message = R.string.DonationsErrors__your_badge_could_not, // TODO [message-backups] -- This will need a backups-specific string
|
||||
title = R.string.DonationsErrors__couldnt_add_badge, // TODO [backups] -- This will need a backups-specific string
|
||||
message = R.string.DonationsErrors__your_badge_could_not, // TODO [backups] -- This will need a backups-specific string
|
||||
positiveAction = callback.onContactSupport(context),
|
||||
negativeAction = null
|
||||
)
|
||||
|
||||
@@ -16,10 +16,10 @@ object GooglePlayBillingDependencies : BillingDependencies {
|
||||
override val context: Context get() = AppDependencies.application
|
||||
|
||||
override suspend fun getProductId(): String {
|
||||
return "backup" // TODO [message-backups] This really shouldn't be hardcoded into the app.
|
||||
return "backup" // TODO [backups] This really shouldn't be hardcoded into the app.
|
||||
}
|
||||
|
||||
override suspend fun getBasePlanId(): String {
|
||||
return "monthly" // TODO [message-backups] This really shouldn't be hardcoded into the app.
|
||||
return "monthly" // TODO [backups] This really shouldn't be hardcoded into the app.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ private fun LogInWithoutTransferringOption(
|
||||
modifier = Modifier.padding(horizontal = 18.dp)
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.symbol_backup_light), // TODO [message-backups] Finalized asset.
|
||||
painter = painterResource(id = R.drawable.symbol_backup_light), // TODO [backups] Finalized asset.
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colorScheme.primary,
|
||||
modifier = Modifier.size(36.dp)
|
||||
@@ -225,7 +225,7 @@ private fun TransferFromAndroidDeviceOption(
|
||||
modifier = Modifier.padding(horizontal = 18.dp)
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.symbol_backup_light), // TODO [message-backups] Finalized asset.
|
||||
painter = painterResource(id = R.drawable.symbol_backup_light), // TODO [backups] Finalized asset.
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colorScheme.primary,
|
||||
modifier = Modifier.size(36.dp)
|
||||
@@ -261,7 +261,7 @@ private fun RestoreLocalBackupOption(
|
||||
modifier = Modifier.padding(horizontal = 18.dp)
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.symbol_backup_light), // TODO [message-backups] Finalized asset.
|
||||
painter = painterResource(id = R.drawable.symbol_backup_light), // TODO [backups] Finalized asset.
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colorScheme.primary,
|
||||
modifier = Modifier.size(36.dp)
|
||||
|
||||
@@ -144,7 +144,7 @@ class InAppPaymentPurchaseTokenJob private constructor(
|
||||
when (status) {
|
||||
402 -> {
|
||||
warning("The purchaseToken payment is incomplete or invalid.", applicationError)
|
||||
// TODO [message-backups] -- Is this a recoverable failure?
|
||||
// TODO [backups] -- Is this a recoverable failure?
|
||||
throw IOException("TODO -- recoverable?")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user