Rename DonationValues to InAppPaymentValues.

This commit is contained in:
Alex Hart
2024-06-27 09:57:16 -03:00
committed by Cody Henthorne
parent b943df1ce4
commit 77d3116431
49 changed files with 204 additions and 204 deletions

View File

@@ -45,7 +45,7 @@ class BadgeRepository(context: Context) {
Log.d(TAG, "[setVisibilityForAllBadgesSync] Uploading profile...", true)
ProfileUtil.uploadProfileWithBadges(context, badges)
SignalStore.donations.setDisplayBadgesOnProfile(displayBadgesOnProfile)
SignalStore.inAppPayments.setDisplayBadgesOnProfile(displayBadgesOnProfile)
recipientTable.markNeedsSync(Recipient.self().id)
Log.d(TAG, "[setVisibilityForAllBadgesSync] Requesting data change sync...", true)

View File

@@ -43,7 +43,7 @@ object ExpiredGiftSheetConfiguration {
)
)
if (SignalStore.donations.isLikelyASustainer()) {
if (SignalStore.inAppPayments.isLikelyASustainer()) {
primaryButton(
text = DSLSettingsText.from(
stringId = android.R.string.ok

View File

@@ -33,7 +33,7 @@ class GiftFlowViewModel(
private val store = RxStore(
GiftFlowState(
currency = SignalStore.donations.getOneTimeCurrency()
currency = SignalStore.inAppPayments.getOneTimeCurrency()
)
)
private val disposables = CompositeDisposable()
@@ -66,7 +66,7 @@ class GiftFlowViewModel(
fun refresh() {
disposables.clear()
disposables += SignalStore.donations.observableOneTimeCurrency.subscribe { currency ->
disposables += SignalStore.inAppPayments.observableOneTimeCurrency.subscribe { currency ->
store.update {
it.copy(
currency = currency

View File

@@ -59,7 +59,7 @@ class ViewReceivedGiftViewModel(
.subscribe { badge ->
val otherBadges = Recipient.self().badges.filterNot { it.id == badge.id }
val hasOtherBadges = otherBadges.isNotEmpty()
val displayingBadges = SignalStore.donations.getDisplayBadgesOnProfile()
val displayingBadges = SignalStore.inAppPayments.getDisplayBadgesOnProfile()
val displayingOtherBadges = hasOtherBadges && displayingBadges
store.update {

View File

@@ -32,7 +32,7 @@ class ExpiredOneTimeBadgeBottomSheetDialogFragment : DSLSettingsBottomSheetFragm
private fun getConfiguration(): DSLConfiguration {
val args = ExpiredOneTimeBadgeBottomSheetDialogFragmentArgs.fromBundle(requireArguments())
val badge: Badge = args.badge
val isLikelyASustainer = SignalStore.donations.isLikelyASustainer()
val isLikelyASustainer = SignalStore.inAppPayments.isLikelyASustainer()
Log.d(TAG, "Displaying Expired Badge Fragment with bundle: ${requireArguments()}", true)

View File

@@ -96,7 +96,7 @@ class MonthlyDonationCanceledBottomSheetDialogFragment : ComposeBottomSheetDialo
dismissAllowingStateLoss()
},
onNotNowClicked = {
SignalStore.donations.showMonthlyDonationCanceledDialog = false
SignalStore.inAppPayments.showMonthlyDonationCanceledDialog = false
dismissAllowingStateLoss()
}
)

View File

@@ -58,8 +58,8 @@ class MonthlyDonationCanceledViewModel(
private fun initializeFromSignalStore() {
internalState.value = MonthlyDonationCanceledState(
loadState = MonthlyDonationCanceledState.LoadState.READY,
badge = SignalStore.donations.getExpiredBadge(),
errorMessage = getErrorMessage(SignalStore.donations.getUnexpectedSubscriptionCancelationChargeFailure())
badge = SignalStore.inAppPayments.getExpiredBadge(),
errorMessage = getErrorMessage(SignalStore.inAppPayments.getUnexpectedSubscriptionCancelationChargeFailure())
)
}

View File

@@ -38,7 +38,7 @@ class BadgesOverviewViewModel(
state.copy(
stage = if (state.stage == BadgesOverviewState.Stage.INIT) BadgesOverviewState.Stage.READY else state.stage,
allUnlockedBadges = recipient.badges,
displayBadgesOnProfile = SignalStore.donations.getDisplayBadgesOnProfile(),
displayBadgesOnProfile = SignalStore.inAppPayments.getDisplayBadgesOnProfile(),
featuredBadge = recipient.featuredBadge
)
}