Topic-related fixes

This commit is contained in:
Ali
2022-10-25 19:12:18 +04:00
parent cd949e0542
commit a28ed6a7dc
17 changed files with 149 additions and 94 deletions

View File

@@ -1397,7 +1397,13 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
authorRank = attributes.rank
}
if authorRank == nil {
var enableAutoRank = false
if let authorRank = authorRank, case .admin = authorRank {
enableAutoRank = true
} else if authorRank == nil {
enableAutoRank = true
}
if enableAutoRank {
if let topicAuthorId = item.associatedData.topicAuthorId, topicAuthorId == message.author?.id {
authorRank = .custom(item.presentationData.strings.Chat_Message_TopicAuthorBadge)
}