Monoforums

This commit is contained in:
Isaac
2025-05-23 18:04:36 +08:00
parent 23e52bc1f7
commit 77e21b4047
9 changed files with 65 additions and 82 deletions

View File

@@ -178,6 +178,9 @@ final class ChatMessageNotificationItemNode: NotificationItemNode {
if firstMessage.id.peerId.isRepliesOrVerificationCodes, let author = firstMessage.forwardInfo?.author {
avatarPeer = EnginePeer(author)
}
if case let .channel(channel) = avatarPeer, channel.isMonoForum, let linkedMonoforumId = channel.linkedMonoforumId, let mainChannel = firstMessage.peers[linkedMonoforumId] as? TelegramChannel {
avatarPeer = .channel(mainChannel)
}
self.avatarNode.setPeer(context: item.context, theme: presentationData.theme, peer: avatarPeer, overrideImage: peer.id == item.context.account.peerId ? .savedMessagesIcon : nil, emptyColor: presentationData.theme.list.mediaPlaceholderColor)
}