mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Name color improvements
This commit is contained in:
@@ -393,24 +393,24 @@ public class ChatMessageTextBubbleContentNode: ChatMessageBubbleContentNode {
|
||||
underlineLinks = false
|
||||
}
|
||||
|
||||
let author = item.message.author
|
||||
// let author = item.message.author
|
||||
let mainColor: UIColor
|
||||
var secondaryColor: UIColor?
|
||||
let secondaryColor: UIColor? = nil
|
||||
if !incoming {
|
||||
mainColor = messageTheme.accentTextColor
|
||||
if let _ = author?.nameColor?.dashColors.1 {
|
||||
secondaryColor = .clear
|
||||
}
|
||||
// if let _ = author?.nameColor?.dashColors.1 {
|
||||
// secondaryColor = .clear
|
||||
// }
|
||||
} else {
|
||||
var authorNameColor: UIColor?
|
||||
authorNameColor = author?.nameColor?.color
|
||||
secondaryColor = author?.nameColor?.dashColors.1
|
||||
// let authorNameColor: UIColor?
|
||||
// authorNameColor = author?.nameColor?.color
|
||||
// secondaryColor = author?.nameColor?.dashColors.1
|
||||
|
||||
if let authorNameColor {
|
||||
mainColor = authorNameColor
|
||||
} else {
|
||||
// if let authorNameColor {
|
||||
// mainColor = authorNameColor
|
||||
// } else {
|
||||
mainColor = messageTheme.accentTextColor
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
attributedText = stringWithAppliedEntities(rawText, entities: entities, baseColor: messageTheme.primaryTextColor, linkColor: messageTheme.linkTextColor, baseQuoteTintColor: mainColor, baseQuoteSecondaryTintColor: secondaryColor, baseFont: textFont, linkFont: textFont, boldFont: item.presentationData.messageBoldFont, italicFont: item.presentationData.messageItalicFont, boldItalicFont: item.presentationData.messageBoldItalicFont, fixedFont: item.presentationData.messageFixedFont, blockQuoteFont: item.presentationData.messageBlockQuoteFont, underlineLinks: underlineLinks, message: item.message, adjustQuoteFontSize: true)
|
||||
|
||||
Reference in New Issue
Block a user