Various improvements

This commit is contained in:
Ilya Laktyushin
2025-07-27 03:04:03 +02:00
parent 5a5892b3a7
commit f3a27124d7
23 changed files with 231 additions and 127 deletions

View File

@@ -1209,8 +1209,7 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
case .stars:
starsString = strings.Notification_StarsGift_Bought_Stars(Int32(resaleStars.amount.value))
case .ton:
//TODO:localize
starsString = "\(Int32(resaleStars.amount.value)) TON"
starsString = formatTonAmountText(resaleStars.amount.value, dateTimeFormat: dateTimeFormat) + " TON"
}
if message.id.peerId == accountPeerId {
attributedString = addAttributesToStringWithRanges(strings.Notification_StarsGift_BoughtForYouself(starsString)._tuple, body: bodyAttributes, argumentAttributes: [0: boldAttributes])
@@ -1249,7 +1248,6 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
case .stars:
starsString = strings.Notification_StarsGift_Bought_Stars(Int32(resaleStars.amount.value))
case .ton:
//TODO:localize
starsString = formatTonAmountText(resaleStars.amount.value, dateTimeFormat: dateTimeFormat) + " TON"
}
let giftTitle = "\(gift.title) #\(presentationStringsFormattedNumber(gift.number, dateTimeFormat.groupingSeparator))"