diff --git a/submodules/BotPaymentsUI/Sources/BotCheckoutController.swift b/submodules/BotPaymentsUI/Sources/BotCheckoutController.swift index fad3844aea..990bda668d 100644 --- a/submodules/BotPaymentsUI/Sources/BotCheckoutController.swift +++ b/submodules/BotPaymentsUI/Sources/BotCheckoutController.swift @@ -180,6 +180,7 @@ public final class BotCheckoutController: ViewController { guard !self.didCancel && !self.didFail && !self.didComplete else { return } + self.didCancel = true self.cancelled() } @@ -188,6 +189,7 @@ public final class BotCheckoutController: ViewController { guard !self.didCancel && !self.didFail && !self.didComplete else { return } + self.didFail = true self.failed() } @@ -196,6 +198,7 @@ public final class BotCheckoutController: ViewController { guard !self.didCancel && !self.didFail && !self.didComplete else { return } + self.didComplete = true self.completed(currencyValue, receiptMessageId) } diff --git a/submodules/BotPaymentsUI/Sources/BotCheckoutControllerNode.swift b/submodules/BotPaymentsUI/Sources/BotCheckoutControllerNode.swift index 9a0703360e..17c73da3c7 100644 --- a/submodules/BotPaymentsUI/Sources/BotCheckoutControllerNode.swift +++ b/submodules/BotPaymentsUI/Sources/BotCheckoutControllerNode.swift @@ -1299,8 +1299,8 @@ final class BotCheckoutControllerNode: ItemListControllerNode, PKPaymentAuthoriz } if success { - strongSelf.dismissAnimated() strongSelf.completed(currencyValue, receiptMessageId) + strongSelf.dismissAnimated() } else { strongSelf.dismissAnimated() } diff --git a/submodules/PremiumUI/Sources/PremiumStarComponent.swift b/submodules/PremiumUI/Sources/PremiumStarComponent.swift index 4e1c3b3047..92bf12d1e2 100644 --- a/submodules/PremiumUI/Sources/PremiumStarComponent.swift +++ b/submodules/PremiumUI/Sources/PremiumStarComponent.swift @@ -208,15 +208,15 @@ class PremiumStarComponent: Component { "rotate", "tapRotate" ] - if #available(iOS 11.0, *) { - for key in keys { - node.removeAnimation(forKey: key, blendOutDuration: 0.1) - } - } else { +// if #available(iOS 11.0, *) { +// for key in keys { +// node.removeAnimation(forKey: key, blendOutDuration: 0.1) +// } +// } else { for key in keys { node.removeAnimation(forKey: key) } - } +// } switch gesture.state { case .began: @@ -535,9 +535,9 @@ class PremiumStarComponent: Component { let to = SCNVector3(x: 0.0, y: toValue, z: 0.0) let distance = rad2deg(to.y - from.y) -// guard !distance.isZero else { -// return -// } + guard !distance.isZero else { + return + } let springAnimation = CASpringAnimation(keyPath: "eulerAngles") springAnimation.fromValue = NSValue(scnVector3: from)