Skip to content

Commit 46d71cd

Browse files
committed
Merge commit 'd156e552335c98c2d7c432567b8a093457ea10a5' into beta
2 parents 4dc1134 + d156e55 commit 46d71cd

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

Telegram/Telegram-iOS/en.lproj/Localizable.strings

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14996,3 +14996,11 @@ Sorry for the inconvenience.";
1499614996
"Gift.Value.ForSaleOnFragment" = "for sale on Fragment";
1499714997

1499814998
"Gift.View.Context.SetAsTheme" = "Set as Theme in...";
14999+
15000+
"Notification.GiftStars" = "Gift for %@";
15001+
"Notification.GiftStars.Stars_1" = "%@ Star";
15002+
"Notification.GiftStars.Stars_any" = "%@ Stars";
15003+
15004+
"Notification.PrepaidGiftUpgrade" = "Gift Upgrade for %@";
15005+
"Notification.PrepaidGiftUpgrade.Stars_1" = "%@ Star";
15006+
"Notification.PrepaidGiftUpgrade.Stars_any" = "%@ Stars";

submodules/TelegramStringFormatting/Sources/ServiceMessageStrings.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,15 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
11731173
let mutableAttributedString = NSMutableAttributedString(attributedString: stringWithAppliedEntities(text, entities: entities ?? [], baseColor: primaryTextColor, linkColor: primaryTextColor, baseFont: titleFont, linkFont: titleBoldFont, boldFont: titleBoldFont, italicFont: titleFont, boldItalicFont: titleBoldFont, fixedFont: titleFont, blockQuoteFont: titleFont, underlineLinks: false, message: message._asMessage()))
11741174
attributedString = mutableAttributedString
11751175
} else {
1176-
attributedString = NSAttributedString(string: strings.Notification_Gift, font: titleFont, textColor: primaryTextColor)
1176+
if isPrepaidUpgrade {
1177+
let starsPrice = strings.Notification_PrepaidGiftUpgrade_Stars(Int32(clamping: upgradeStars ?? 0))
1178+
attributedString = NSAttributedString(string: strings.Notification_PrepaidGiftUpgrade(starsPrice).string, font: titleFont, textColor: primaryTextColor)
1179+
} else if case let .generic(gift) = gift {
1180+
let starsPrice = strings.Notification_GiftStars_Stars(Int32(clamping: gift.price))
1181+
attributedString = NSAttributedString(string: strings.Notification_GiftStars(starsPrice).string, font: titleFont, textColor: primaryTextColor)
1182+
} else {
1183+
attributedString = NSAttributedString(string: strings.Notification_Gift, font: titleFont, textColor: primaryTextColor)
1184+
}
11771185
}
11781186
} else if case let .generic(gift) = gift {
11791187
var finalPrice = gift.price

submodules/TelegramUI/Sources/ChatController.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5831,6 +5831,9 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
58315831
}
58325832
}
58335833
case .gift:
5834+
if let darkAppearancePreview = darkAppearancePreview {
5835+
useDarkAppearance = darkAppearancePreview
5836+
}
58345837
if let theme = makePresentationTheme(chatTheme: chatTheme, dark: useDarkAppearance) {
58355838
theme.forceSync = true
58365839
presentationData = presentationData.withUpdated(theme: theme).withUpdated(chatWallpaper: theme.chat.defaultWallpaper)

0 commit comments

Comments
 (0)