Fix build

This commit is contained in:
Isaac 2026-01-30 22:57:12 +08:00
parent 47cef684ba
commit 8af5f74cf7
3 changed files with 9 additions and 0 deletions

View file

@ -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] {

View file

@ -1013,6 +1013,9 @@ private final class GiftViewSheetContent: CombinedComponent {
.single(gift.themePeerId)
|> then(
context.engine.payments.getUniqueStarGift(slug: gift.slug)
|> `catch` { _ -> Signal<StarGift.UniqueGift?, NoError> in
return .single(nil)
}
|> map { gift in
return gift?.themePeerId
}

View file

@ -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<StarGift.UniqueGift?, NoError> in
return .single(nil)
}
|> map { gift -> ResolveInternalUrlResult in
return .result(.collectible(gift: gift))
})