diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/backups/remote/RemoteBackupsSettingsViewModel.kt b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/backups/remote/RemoteBackupsSettingsViewModel.kt index d268ac66fd..08852a5c2b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/backups/remote/RemoteBackupsSettingsViewModel.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/backups/remote/RemoteBackupsSettingsViewModel.kt @@ -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) {