Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios

This commit is contained in:
Ilya Laktyushin
2023-10-15 17:27:40 +04:00
207 changed files with 6829 additions and 4593 deletions

View File

@@ -900,6 +900,9 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
}
case .giftCode:
attributedString = NSAttributedString(string: strings.Notification_GiftLink, font: titleFont, textColor: primaryTextColor)
case .giveawayLaunched:
let resultTitleString = strings.Notification_GiveawayStarted(compactAuthorName)
attributedString = addAttributesToStringWithRanges(resultTitleString._tuple, body: bodyAttributes, argumentAttributes: [0: boldAttributes])
case .unknown:
attributedString = nil
}
@@ -922,10 +925,6 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
resultTitleString = strings.Conversation_StoryExpiredMentionTextOutgoing(compactPeerName)
}
attributedString = addAttributesToStringWithRanges(resultTitleString._tuple, body: bodyAttributes, argumentAttributes: [0: boldAttributes])
} else if let _ = media as? TelegramMediaGiveaway {
let compactAuthorName = message.author?.compactDisplayTitle ?? ""
let resultTitleString = strings.Notification_GiveawayStarted(compactAuthorName)
attributedString = addAttributesToStringWithRanges(resultTitleString._tuple, body: bodyAttributes, argumentAttributes: [0: boldAttributes])
}
}