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 {
|
guard !self.didCancel && !self.didFail && !self.didComplete else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
self.didCancel = true
|
||||||
self.cancelled()
|
self.cancelled()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,6 +189,7 @@ public final class BotCheckoutController: ViewController {
|
|||||||
guard !self.didCancel && !self.didFail && !self.didComplete else {
|
guard !self.didCancel && !self.didFail && !self.didComplete else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
self.didFail = true
|
||||||
self.failed()
|
self.failed()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,6 +198,7 @@ public final class BotCheckoutController: ViewController {
|
|||||||
guard !self.didCancel && !self.didFail && !self.didComplete else {
|
guard !self.didCancel && !self.didFail && !self.didComplete else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
self.didComplete = true
|
||||||
self.completed(currencyValue, receiptMessageId)
|
self.completed(currencyValue, receiptMessageId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1299,8 +1299,8 @@ final class BotCheckoutControllerNode: ItemListControllerNode, PKPaymentAuthoriz
|
|||||||
}
|
}
|
||||||
|
|
||||||
if success {
|
if success {
|
||||||
strongSelf.dismissAnimated()
|
|
||||||
strongSelf.completed(currencyValue, receiptMessageId)
|
strongSelf.completed(currencyValue, receiptMessageId)
|
||||||
|
strongSelf.dismissAnimated()
|
||||||
} else {
|
} else {
|
||||||
strongSelf.dismissAnimated()
|
strongSelf.dismissAnimated()
|
||||||
}
|
}
|
||||||
|
@ -208,15 +208,15 @@ class PremiumStarComponent: Component {
|
|||||||
"rotate",
|
"rotate",
|
||||||
"tapRotate"
|
"tapRotate"
|
||||||
]
|
]
|
||||||
if #available(iOS 11.0, *) {
|
// if #available(iOS 11.0, *) {
|
||||||
for key in keys {
|
// for key in keys {
|
||||||
node.removeAnimation(forKey: key, blendOutDuration: 0.1)
|
// node.removeAnimation(forKey: key, blendOutDuration: 0.1)
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
for key in keys {
|
for key in keys {
|
||||||
node.removeAnimation(forKey: key)
|
node.removeAnimation(forKey: key)
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
|
|
||||||
switch gesture.state {
|
switch gesture.state {
|
||||||
case .began:
|
case .began:
|
||||||
@ -535,9 +535,9 @@ class PremiumStarComponent: Component {
|
|||||||
let to = SCNVector3(x: 0.0, y: toValue, z: 0.0)
|
let to = SCNVector3(x: 0.0, y: toValue, z: 0.0)
|
||||||
let distance = rad2deg(to.y - from.y)
|
let distance = rad2deg(to.y - from.y)
|
||||||
|
|
||||||
// guard !distance.isZero else {
|
guard !distance.isZero else {
|
||||||
// return
|
return
|
||||||
// }
|
}
|
||||||
|
|
||||||
let springAnimation = CASpringAnimation(keyPath: "eulerAngles")
|
let springAnimation = CASpringAnimation(keyPath: "eulerAngles")
|
||||||
springAnimation.fromValue = NSValue(scnVector3: from)
|
springAnimation.fromValue = NSValue(scnVector3: from)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user