Various fixes

This commit is contained in:
Ilya Laktyushin 2025-08-29 23:55:43 +04:00
parent c54e9fbedf
commit be54adbfa7
2 changed files with 3 additions and 3 deletions

View File

@ -2503,7 +2503,7 @@ public final class ChatListNode: ListView {
case let .user(userType): case let .user(userType):
if case let .user(user) = peer { if case let .user(user) = peer {
match = true match = true
if user.id.isVerificationCodes { if user.id.isVerificationCodes || user.id.isTelegramNotifications {
match = false match = false
} }
if let isBot = userType.isBot { if let isBot = userType.isBot {

View File

@ -1167,7 +1167,7 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
attributedString = mutableString attributedString = mutableString
case .prizeStars: case .prizeStars:
attributedString = NSAttributedString(string: strings.Notification_StarsPrize, font: titleFont, textColor: primaryTextColor) attributedString = NSAttributedString(string: strings.Notification_StarsPrize, font: titleFont, textColor: primaryTextColor)
case let .starGift(gift, _, text, entities, _, _, _, _, _, upgradeStars, _, isPrepaidUpgrade, _, peerId, senderId, _, _, _, _): case let .starGift(gift, _, text, entities, _, _, _, _, _, upgradeStars, _, isPrepaidUpgrade, _, peerId, senderId, _, _, _, upgradeSeparate):
if !forAdditionalServiceMessage { if !forAdditionalServiceMessage {
if let text { if let text {
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())) 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()))
@ -1177,7 +1177,7 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
} }
} else if case let .generic(gift) = gift { } else if case let .generic(gift) = gift {
var finalPrice = gift.price var finalPrice = gift.price
if let upgradeStars { if let upgradeStars, !upgradeSeparate {
finalPrice += upgradeStars finalPrice += upgradeStars
} }
let starsPrice = strings.Notification_StarsGift_Stars(Int32(clamping: finalPrice)) let starsPrice = strings.Notification_StarsGift_Stars(Int32(clamping: finalPrice))