diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/donate/gateway/GatewaySelectorBottomSheet.kt b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/donate/gateway/GatewaySelectorBottomSheet.kt index cbb6edab7f..cdec689053 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/donate/gateway/GatewaySelectorBottomSheet.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/donate/gateway/GatewaySelectorBottomSheet.kt @@ -60,7 +60,6 @@ class GatewaySelectorBottomSheet : DSLSettingsBottomSheetFragment() { private fun getConfiguration(state: GatewaySelectorState): DSLConfiguration { return configure { - // TODO [backups] -- No badge on message backups. customPref( BadgeDisplay112.Model( badge = state.inAppPayment.data.badge!!.let { Badges.fromDatabaseBadge(it) }, @@ -209,7 +208,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 [backups] necessary? + InAppPaymentType.RECURRING_BACKUP -> error("This type is not supported") InAppPaymentType.RECURRING_DONATION -> presentMonthlyText(context, inAppPayment) InAppPaymentType.ONE_TIME_DONATION -> presentOneTimeText(context, inAppPayment) InAppPaymentType.ONE_TIME_GIFT -> presentGiftText(context, inAppPayment) diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/donate/paypal/PayPalPaymentInProgressFragment.kt b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/donate/paypal/PayPalPaymentInProgressFragment.kt index 73e796ba89..a98970ec1d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/donate/paypal/PayPalPaymentInProgressFragment.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/donate/paypal/PayPalPaymentInProgressFragment.kt @@ -23,6 +23,7 @@ import org.signal.core.util.logging.Log import org.signal.donations.InAppPaymentType import org.thoughtcrime.securesms.R import org.thoughtcrime.securesms.components.ViewBinderDelegate +import org.thoughtcrime.securesms.components.settings.app.subscription.InAppPaymentsRepository.requireSubscriberType import org.thoughtcrime.securesms.components.settings.app.subscription.InAppPaymentsRepository.toErrorSource import org.thoughtcrime.securesms.components.settings.app.subscription.donate.InAppPaymentProcessorAction import org.thoughtcrime.securesms.components.settings.app.subscription.donate.InAppPaymentProcessorActionResult @@ -70,7 +71,7 @@ class PayPalPaymentInProgressFragment : DialogFragment(R.layout.donation_in_prog } InAppPaymentProcessorAction.CANCEL_SUBSCRIPTION -> { - viewModel.cancelSubscription(InAppPaymentSubscriberRecord.Type.DONATION) // TODO [backups] Remove hardcode + viewModel.cancelSubscription(args.inAppPaymentType.requireSubscriberType()) } } }