mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-27 14:40:22 +00:00
Fix hot loop when creating a subscription to remote backups.
This commit is contained in:
committed by
Greyson Parrelli
parent
5e10ccc969
commit
0c86ff1f84
@@ -95,6 +95,18 @@ class MessageBackupsFlowViewModel(
|
||||
Log.d(TAG, "Got successful purchase result for purchase at ${result.purchaseTime}")
|
||||
val id = internalStateFlow.value.inAppPayment!!.id
|
||||
|
||||
if (result.isAcknowledged) {
|
||||
Log.w(TAG, "Payment is already acknowledged. Ignoring.")
|
||||
|
||||
internalStateFlow.update {
|
||||
it.copy(
|
||||
stage = MessageBackupsStage.COMPLETED
|
||||
)
|
||||
}
|
||||
|
||||
return@collect
|
||||
}
|
||||
|
||||
try {
|
||||
Log.d(TAG, "Attempting to handle successful purchase.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user