Compare commits

...

2 Commits

Author SHA1 Message Date
Alex Hart
f69b810663 Bump version to 7.12.3 2024-07-29 12:22:51 -03:00
Alex Hart
ebec2f5246 Fix donation action routing. 2024-07-29 12:20:13 -03:00
3 changed files with 13 additions and 6 deletions

View File

@@ -22,8 +22,8 @@ plugins {
apply(from = "static-ips.gradle.kts") apply(from = "static-ips.gradle.kts")
val canonicalVersionCode = 1439 val canonicalVersionCode = 1439
val canonicalVersionName = "7.12.2" val canonicalVersionName = "7.12.3"
val currentHotfixVersion = 0 val currentHotfixVersion = 1
val maxHotfixVersions = 100 val maxHotfixVersions = 100
val keystores: Map<String, Properties?> = mapOf("debug" to loadKeystoreProperties("keystore.debug.properties")) val keystores: Map<String, Properties?> = mapOf("debug" to loadKeystoreProperties("keystore.debug.properties"))

View File

@@ -6,6 +6,6 @@ import org.thoughtcrime.securesms.database.InAppPaymentTable
sealed class DonateToSignalAction { sealed class DonateToSignalAction {
data class DisplayCurrencySelectionDialog(val inAppPaymentType: InAppPaymentType, val supportedCurrencies: List<String>) : DonateToSignalAction() data class DisplayCurrencySelectionDialog(val inAppPaymentType: InAppPaymentType, val supportedCurrencies: List<String>) : DonateToSignalAction()
data class DisplayGatewaySelectorDialog(val inAppPayment: InAppPaymentTable.InAppPayment) : DonateToSignalAction() data class DisplayGatewaySelectorDialog(val inAppPayment: InAppPaymentTable.InAppPayment) : DonateToSignalAction()
object CancelSubscription : DonateToSignalAction() data object CancelSubscription : DonateToSignalAction()
data class UpdateSubscription(val inAppPayment: InAppPaymentTable.InAppPayment, val isLongRunning: Boolean) : DonateToSignalAction() data class UpdateSubscription(val inAppPayment: InAppPaymentTable.InAppPayment, val isLongRunning: Boolean) : DonateToSignalAction()
} }

View File

@@ -171,26 +171,32 @@ class DonateToSignalFragment :
} }
is DonateToSignalAction.CancelSubscription -> { is DonateToSignalAction.CancelSubscription -> {
DonateToSignalFragmentDirections.actionDonateToSignalFragmentToStripePaymentInProgressFragment( val navAction = DonateToSignalFragmentDirections.actionDonateToSignalFragmentToStripePaymentInProgressFragment(
InAppPaymentProcessorAction.CANCEL_SUBSCRIPTION, InAppPaymentProcessorAction.CANCEL_SUBSCRIPTION,
null, null,
InAppPaymentType.RECURRING_DONATION InAppPaymentType.RECURRING_DONATION
) )
findNavController().safeNavigate(navAction)
} }
is DonateToSignalAction.UpdateSubscription -> { is DonateToSignalAction.UpdateSubscription -> {
if (action.inAppPayment.data.paymentMethodType == InAppPaymentData.PaymentMethodType.PAYPAL) { if (action.inAppPayment.data.paymentMethodType == InAppPaymentData.PaymentMethodType.PAYPAL) {
DonateToSignalFragmentDirections.actionDonateToSignalFragmentToPaypalPaymentInProgressFragment( val navAction = DonateToSignalFragmentDirections.actionDonateToSignalFragmentToPaypalPaymentInProgressFragment(
InAppPaymentProcessorAction.UPDATE_SUBSCRIPTION, InAppPaymentProcessorAction.UPDATE_SUBSCRIPTION,
action.inAppPayment, action.inAppPayment,
action.inAppPayment.type action.inAppPayment.type
) )
findNavController().safeNavigate(navAction)
} else { } else {
DonateToSignalFragmentDirections.actionDonateToSignalFragmentToStripePaymentInProgressFragment( val navAction = DonateToSignalFragmentDirections.actionDonateToSignalFragmentToStripePaymentInProgressFragment(
InAppPaymentProcessorAction.UPDATE_SUBSCRIPTION, InAppPaymentProcessorAction.UPDATE_SUBSCRIPTION,
action.inAppPayment, action.inAppPayment,
action.inAppPayment.type action.inAppPayment.type
) )
findNavController().safeNavigate(navAction)
} }
} }
} }
@@ -507,6 +513,7 @@ class DonateToSignalFragment :
} }
override fun onSubscriptionCancelled(inAppPaymentType: InAppPaymentType) { override fun onSubscriptionCancelled(inAppPaymentType: InAppPaymentType) {
viewModel.refreshActiveSubscription()
Snackbar.make(requireView(), R.string.SubscribeFragment__your_subscription_has_been_cancelled, Snackbar.LENGTH_LONG).show() Snackbar.make(requireView(), R.string.SubscribeFragment__your_subscription_has_been_cancelled, Snackbar.LENGTH_LONG).show()
} }