From 7b3cf927201cfb3b4bf548ac10ee33d2abd01853 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Mon, 1 Sep 2025 03:30:20 +0400 Subject: [PATCH] Various fixes --- .../Sources/TelegramEngine/Payments/Stars.swift | 2 ++ .../Gifts/GiftSetupScreen/Sources/GiftSetupScreen.swift | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Payments/Stars.swift b/submodules/TelegramCore/Sources/TelegramEngine/Payments/Stars.swift index f2c19cb801..1b1e7ba771 100644 --- a/submodules/TelegramCore/Sources/TelegramEngine/Payments/Stars.swift +++ b/submodules/TelegramCore/Sources/TelegramEngine/Payments/Stars.swift @@ -1678,6 +1678,8 @@ func _internal_sendStarsPaymentForm(account: Account, formId: Int64, source: Bot return .fail(.alreadyPaid) } else if error.errorDescription == "STARGIFT_USAGE_LIMITED" { return .fail(.starGiftOutOfStock) + } else if error.errorDescription == "STARGIFT_USER_USAGE_LIMITED" { + return .fail(.starGiftUserLimit) } return .fail(.generic) } diff --git a/submodules/TelegramUI/Components/Gifts/GiftSetupScreen/Sources/GiftSetupScreen.swift b/submodules/TelegramUI/Components/Gifts/GiftSetupScreen/Sources/GiftSetupScreen.swift index b7c8c81f79..25bee3463c 100644 --- a/submodules/TelegramUI/Components/Gifts/GiftSetupScreen/Sources/GiftSetupScreen.swift +++ b/submodules/TelegramUI/Components/Gifts/GiftSetupScreen/Sources/GiftSetupScreen.swift @@ -477,7 +477,12 @@ final class GiftSetupScreenComponent: Component { case .starGiftUserLimit: if let perUserLimit, let giftFile { 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) return }