From b41ec120245b26e50e369c6f510e85c4cd29c9ed Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Mon, 1 Sep 2025 02:28:03 +0400 Subject: [PATCH] Various fixes --- .../Sources/ServiceMessageStrings.swift | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/submodules/TelegramStringFormatting/Sources/ServiceMessageStrings.swift b/submodules/TelegramStringFormatting/Sources/ServiceMessageStrings.swift index 093ceb7e98..0f9bc6fdf7 100644 --- a/submodules/TelegramStringFormatting/Sources/ServiceMessageStrings.swift +++ b/submodules/TelegramStringFormatting/Sources/ServiceMessageStrings.swift @@ -845,7 +845,8 @@ public func universalServiceMessageString(presentationData: (PresentationTheme, case let .giftStars(currency, amount, count, _, _, _): let _ = count if !forAdditionalServiceMessage { - attributedString = NSAttributedString(string: strings.Notification_Gift, font: titleFont, textColor: primaryTextColor) + let starsPrice = strings.Notification_GiftStars_Stars(Int32(clamping: count)) + attributedString = NSAttributedString(string: strings.Notification_GiftStars(starsPrice).string, font: titleFont, textColor: primaryTextColor) } else { let price = formatCurrencyAmount(amount, currency: currency) if message.author?.id == accountPeerId { @@ -1176,9 +1177,6 @@ public func universalServiceMessageString(presentationData: (PresentationTheme, if isPrepaidUpgrade { let starsPrice = strings.Notification_PrepaidGiftUpgrade_Stars(Int32(clamping: upgradeStars ?? 0)) attributedString = NSAttributedString(string: strings.Notification_PrepaidGiftUpgrade(starsPrice).string, font: titleFont, textColor: primaryTextColor) - } else if case let .generic(gift) = gift { - let starsPrice = strings.Notification_GiftStars_Stars(Int32(clamping: gift.price)) - attributedString = NSAttributedString(string: strings.Notification_GiftStars(starsPrice).string, font: titleFont, textColor: primaryTextColor) } else { attributedString = NSAttributedString(string: strings.Notification_Gift, font: titleFont, textColor: primaryTextColor) }