mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 04:58:45 +00:00
Resolve consistent subscription state after new subscription is created.
This commit is contained in:
committed by
Greyson Parrelli
parent
5ec3371b9a
commit
9b6f355802
@@ -204,18 +204,27 @@ class RemoteBackupsSettingsViewModel : ViewModel() {
|
||||
BackupRepository.getBackupsType(MessageBackupTier.PAID) as MessageBackupsType.Paid
|
||||
}
|
||||
|
||||
if (hasActiveSignalSubscription && !hasActiveGooglePlayBillingSubscription) {
|
||||
_state.update {
|
||||
it.copy(
|
||||
backupState = RemoteBackupsSettingsState.BackupState.SubscriptionMismatchMissingGooglePlay(
|
||||
messageBackupsType = type,
|
||||
renewalTime = activeSubscription!!.activeSubscription.endOfCurrentPeriod.seconds
|
||||
when {
|
||||
hasActiveSignalSubscription && !hasActiveGooglePlayBillingSubscription -> {
|
||||
_state.update {
|
||||
it.copy(
|
||||
backupState = RemoteBackupsSettingsState.BackupState.SubscriptionMismatchMissingGooglePlay(
|
||||
messageBackupsType = type,
|
||||
renewalTime = activeSubscription!!.activeSubscription.endOfCurrentPeriod.seconds
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
hasActiveSignalSubscription && hasActiveGooglePlayBillingSubscription -> {
|
||||
Log.d(TAG, "Found erroneous mismatch. Clearing.")
|
||||
SignalStore.backup.subscriptionStateMismatchDetected = false
|
||||
}
|
||||
else -> {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
when (tier) {
|
||||
|
||||
Reference in New Issue
Block a user