Skip to content

Commit 3532aad

Browse files
committed
Various fixes
1 parent 975430a commit 3532aad

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14996,3 +14996,7 @@ 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.PrepaidGiftUpgrade" = "Gift Upgrade for %@";
15001+
"Notification.PrepaidGiftUpgrade.Stars_1" = "%@ Star";
15002+
"Notification.PrepaidGiftUpgrade.Stars_any" = "%@ Stars";

submodules/TelegramStringFormatting/Sources/ServiceMessageStrings.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,12 @@ 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 {
1180+
attributedString = NSAttributedString(string: strings.Notification_Gift, font: titleFont, textColor: primaryTextColor)
1181+
}
11771182
}
11781183
} else if case let .generic(gift) = gift {
11791184
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)