[WIP] Monoforums

This commit is contained in:
Isaac
2025-05-08 20:56:55 +01:00
parent 2bd66ced8c
commit 0e119dd6f1
85 changed files with 387 additions and 243 deletions

View File

@@ -598,7 +598,7 @@ private func mappedInsertEntries(context: AccountContext, nodeInteraction: ChatL
}
var isForum = false
if let peer = chatPeer, case let .channel(channel) = peer, channel.flags.contains(.isForum) {
if let peer = chatPeer, case let .channel(channel) = peer, channel.isForumOrMonoForum {
isForum = true
if editing, case .chatList = mode {
enabled = false
@@ -948,7 +948,7 @@ private func mappedUpdateEntries(context: AccountContext, nodeInteraction: ChatL
}
var isForum = false
if let peer = chatPeer, case let .channel(channel) = peer, channel.flags.contains(.isForum) {
if let peer = chatPeer, case let .channel(channel) = peer, channel.isForumOrMonoForum {
isForum = true
if editing, case .chatList = mode {
enabled = false
@@ -2987,7 +2987,7 @@ public final class ChatListNode: ListView {
guard case .global = chatPeerId.category else {
continue
}
if case let .channel(channel) = peerMap[chatPeerId.peerId], channel.flags.contains(.isForum) {
if case let .channel(channel) = peerMap[chatPeerId.peerId], channel.isForumOrMonoForum {
continue
}
itemId = ChatListNodePeerInputActivities.ItemId(peerId: chatPeerId.peerId, threadId: nil)