mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-08 17:53:38 +00:00
Merge commit '7b3cf927201cfb3b4bf548ac10ee33d2abd01853' into beta
This commit is contained in:
commit
27ec161e39
@ -1678,6 +1678,8 @@ func _internal_sendStarsPaymentForm(account: Account, formId: Int64, source: Bot
|
|||||||
return .fail(.alreadyPaid)
|
return .fail(.alreadyPaid)
|
||||||
} else if error.errorDescription == "STARGIFT_USAGE_LIMITED" {
|
} else if error.errorDescription == "STARGIFT_USAGE_LIMITED" {
|
||||||
return .fail(.starGiftOutOfStock)
|
return .fail(.starGiftOutOfStock)
|
||||||
|
} else if error.errorDescription == "STARGIFT_USER_USAGE_LIMITED" {
|
||||||
|
return .fail(.starGiftUserLimit)
|
||||||
}
|
}
|
||||||
return .fail(.generic)
|
return .fail(.generic)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -477,7 +477,12 @@ final class GiftSetupScreenComponent: Component {
|
|||||||
case .starGiftUserLimit:
|
case .starGiftUserLimit:
|
||||||
if let perUserLimit, let giftFile {
|
if let perUserLimit, let giftFile {
|
||||||
let text = presentationData.strings.Gift_Options_Gift_BuyLimitReached(perUserLimit)
|
let text = presentationData.strings.Gift_Options_Gift_BuyLimitReached(perUserLimit)
|
||||||
let undoController = UndoOverlayController(presentationData: presentationData, content: .sticker(context: component.context, file: giftFile, loop: true, title: nil, text: text, undoText: nil, customAction: nil), action: { _ in return false })
|
let undoController = UndoOverlayController(
|
||||||
|
presentationData: presentationData,
|
||||||
|
content: .sticker(context: component.context, file: giftFile, loop: true, title: nil, text: text, undoText: nil, customAction: nil),
|
||||||
|
elevatedLayout: true,
|
||||||
|
action: { _ in return false }
|
||||||
|
)
|
||||||
controller.present(undoController, in: .current)
|
controller.present(undoController, in: .current)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user