Group boosts

This commit is contained in:
Ilya Laktyushin
2024-02-01 12:29:07 +04:00
parent 2716a936bf
commit 1b2b7dc403
120 changed files with 5295 additions and 887 deletions

View File

@@ -937,7 +937,12 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
attributedString = NSAttributedString(string: strings.Notification_GiftLink, font: titleFont, textColor: primaryTextColor)
}
case .giveawayLaunched:
let resultTitleString = strings.Notification_GiveawayStarted(compactAuthorName)
var isGroup = false
let messagePeer = message.peers[message.id.peerId]
if let channel = messagePeer as? TelegramChannel, case .group = channel.info {
isGroup = true
}
let resultTitleString = isGroup ? strings.Notification_GiveawayStartedGroup(compactAuthorName) : strings.Notification_GiveawayStarted(compactAuthorName)
attributedString = addAttributesToStringWithRanges(resultTitleString._tuple, body: bodyAttributes, argumentAttributes: [0: boldAttributes])
case .joinedChannel:
attributedString = NSAttributedString(string: strings.Notification_ChannelJoinedByYou, font: titleBoldFont, textColor: primaryTextColor)