mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix invoice callback
This commit is contained in:
parent
24be14be56
commit
24fb254948
@ -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)
|
||||
}
|
||||
|
||||
|
@ -1299,8 +1299,8 @@ final class BotCheckoutControllerNode: ItemListControllerNode, PKPaymentAuthoriz
|
||||
}
|
||||
|
||||
if success {
|
||||
strongSelf.dismissAnimated()
|
||||
strongSelf.completed(currencyValue, receiptMessageId)
|
||||
strongSelf.dismissAnimated()
|
||||
} else {
|
||||
strongSelf.dismissAnimated()
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user