Cleanly exit on KeepAlive 409.

This commit is contained in:
Alex Hart
2022-11-28 12:47:25 -04:00
committed by GitHub
parent d7404cf32f
commit 683247bf98
4 changed files with 26 additions and 3 deletions

View File

@@ -430,6 +430,16 @@ class InternalSettingsFragment : DSLSettingsFragment(R.string.preferences__inter
findNavController().safeNavigate(InternalSettingsFragmentDirections.actionInternalSettingsFragmentToDonorErrorConfigurationFragment())
}
)
clickPref(
title = DSLSettingsText.from("Clear keep-alive timestamps"),
onClick = {
SignalStore.donationsValues().subscriptionEndOfPeriodRedemptionStarted = 0L
SignalStore.donationsValues().subscriptionEndOfPeriodConversionStarted = 0L
SignalStore.donationsValues().setLastEndOfPeriod(0L)
Toast.makeText(context, "Cleared", Toast.LENGTH_SHORT)
}
)
}
dividerPref()

View File

@@ -20,7 +20,7 @@ class DonateToSignalActivity : FragmentWrapperActivity(), DonationPaymentCompone
override val googlePayResultPublisher: Subject<DonationPaymentComponent.GooglePayResult> = PublishSubject.create()
override fun getFragment(): Fragment {
return NavHostFragment.create(R.navigation.donate_to_signal, DonateToSignalFragmentArgs.Builder(DonateToSignalType.ONE_TIME).build().toBundle())
return NavHostFragment.create(R.navigation.donate_to_signal, DonateToSignalFragmentArgs.Builder(DonateToSignalType.ONE_TIME).build().toBundle())
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {