mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Rename DonationValues to InAppPaymentValues.
This commit is contained in:
committed by
Cody Henthorne
parent
b943df1ce4
commit
77d3116431
@@ -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)
|
||||
|
||||
@@ -43,7 +43,7 @@ object ExpiredGiftSheetConfiguration {
|
||||
)
|
||||
)
|
||||
|
||||
if (SignalStore.donations.isLikelyASustainer()) {
|
||||
if (SignalStore.inAppPayments.isLikelyASustainer()) {
|
||||
primaryButton(
|
||||
text = DSLSettingsText.from(
|
||||
stringId = android.R.string.ok
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ class MonthlyDonationCanceledBottomSheetDialogFragment : ComposeBottomSheetDialo
|
||||
dismissAllowingStateLoss()
|
||||
},
|
||||
onNotNowClicked = {
|
||||
SignalStore.donations.showMonthlyDonationCanceledDialog = false
|
||||
SignalStore.inAppPayments.showMonthlyDonationCanceledDialog = false
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
)
|
||||
|
||||
@@ -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())
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user