Do not run subscription check if backups are disabled.

This commit is contained in:
Alex Hart
2025-06-10 13:51:50 -03:00
parent 8446c8d60f
commit faa12bf377

View File

@@ -77,7 +77,7 @@ class BackupSubscriptionCheckJob private constructor(parameters: Parameters) : C
}
if (!RemoteConfig.messageBackups) {
Log.i(TAG, "Message backups are not enabled. Clearing mismatch value and exiting.")
Log.i(TAG, "Message backups feature is not available. Clearing mismatch value and exiting.")
SignalStore.backup.subscriptionStateMismatchDetected = false
return Result.success()
}
@@ -94,6 +94,12 @@ class BackupSubscriptionCheckJob private constructor(parameters: Parameters) : C
return Result.success()
}
if (!SignalStore.backup.areBackupsEnabled) {
Log.i(TAG, "Backups are not enabled on this device. Clearing mismatch value and exiting.")
SignalStore.backup.subscriptionStateMismatchDetected = false
return Result.success()
}
val purchase: BillingPurchaseResult = AppDependencies.billingApi.queryPurchases()
Log.i(TAG, "Retrieved purchase result from Billing api: $purchase")