mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-04 21:41:45 +00:00
Various fixes
This commit is contained in:
parent
88b02901e8
commit
9daf1581e8
@ -885,14 +885,14 @@ private final class PremiumGiftScreenComponent: CombinedComponent {
|
||||
|
||||
let purpose: AppStoreTransactionPurpose
|
||||
var quantity: Int32 = 1
|
||||
if case .settings = self.source {
|
||||
purpose = .giftCode(peerIds: self.peerIds, boostPeer: nil, currency: currency, amount: amount)
|
||||
quantity = Int32(self.peerIds.count)
|
||||
} else if let peerId = self.peerIds.first {
|
||||
|
||||
if self.source == .profile || self.source == .attachMenu, let peerId = self.peerIds.first {
|
||||
purpose = .gift(peerId: peerId, currency: currency, amount: amount)
|
||||
} else {
|
||||
fatalError()
|
||||
purpose = .giftCode(peerIds: self.peerIds, boostPeer: nil, currency: currency, amount: amount)
|
||||
quantity = Int32(self.peerIds.count)
|
||||
}
|
||||
|
||||
let _ = (self.context.engine.payments.canPurchasePremium(purpose: purpose)
|
||||
|> deliverOnMainQueue).start(next: { [weak self] available in
|
||||
if let strongSelf = self {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user