From 8af5f74cf7fd9a57a95a73dabe49c82d84cd6c48 Mon Sep 17 00:00:00 2001 From: Isaac <> Date: Fri, 30 Jan 2026 22:57:12 +0800 Subject: [PATCH] Fix build --- .../Sources/ServiceMessageStrings.swift | 3 +++ .../Gifts/GiftViewScreen/Sources/GiftViewScreen.swift | 3 +++ submodules/UrlHandling/Sources/UrlHandling.swift | 3 +++ 3 files changed, 9 insertions(+) diff --git a/submodules/TelegramStringFormatting/Sources/ServiceMessageStrings.swift b/submodules/TelegramStringFormatting/Sources/ServiceMessageStrings.swift index 1374de724b..eef5c0df08 100644 --- a/submodules/TelegramStringFormatting/Sources/ServiceMessageStrings.swift +++ b/submodules/TelegramStringFormatting/Sources/ServiceMessageStrings.swift @@ -1743,6 +1743,9 @@ public func universalServiceMessageString(presentationData: (PresentationTheme, attributedString = addAttributesToStringWithRanges(strings.Notification_StarsGiftOffer_Rejected(peerName, giftTitle, priceString)._tuple, body: bodyAttributes, argumentAttributes: attributes) } } + case .starGiftCraftFail: + //TODO:localize + attributedString = NSAttributedString(string: "Gift crafting failed", font: titleFont, textColor: primaryTextColor) case let .groupCreatorChange(groupCreatorChange): var targetName = "" if let peer = message.peers[groupCreatorChange.targetPeerId] { diff --git a/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift b/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift index 118b4c5739..0c3ed41f00 100644 --- a/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift +++ b/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift @@ -1013,6 +1013,9 @@ private final class GiftViewSheetContent: CombinedComponent { .single(gift.themePeerId) |> then( context.engine.payments.getUniqueStarGift(slug: gift.slug) + |> `catch` { _ -> Signal in + return .single(nil) + } |> map { gift in return gift?.themePeerId } diff --git a/submodules/UrlHandling/Sources/UrlHandling.swift b/submodules/UrlHandling/Sources/UrlHandling.swift index 82ace72799..614aef7988 100644 --- a/submodules/UrlHandling/Sources/UrlHandling.swift +++ b/submodules/UrlHandling/Sources/UrlHandling.swift @@ -1208,6 +1208,9 @@ private func resolveInternalUrl(context: AccountContext, url: ParsedInternalUrl) return .single(.result(.premiumGiftCode(slug: slug))) case let .collectible(slug): return .single(.progress) |> then(context.engine.payments.getUniqueStarGift(slug: slug) + |> `catch` { _ -> Signal in + return .single(nil) + } |> map { gift -> ResolveInternalUrlResult in return .result(.collectible(gift: gift)) })