[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

@@ -120,7 +120,7 @@ func titlePanelForChatPresentationInterfaceState(_ chatPresentationInterfaceStat
}
}
if let channel = chatPresentationInterfaceState.renderedPeer?.peer as? TelegramChannel, channel.flags.contains(.isForum) {
if let channel = chatPresentationInterfaceState.renderedPeer?.peer as? TelegramChannel, channel.isForumOrMonoForum {
if let threadData = chatPresentationInterfaceState.threadData {
if threadData.isClosed {
var canManage = false
@@ -167,7 +167,7 @@ func titlePanelForChatPresentationInterfaceState(_ chatPresentationInterfaceStat
}
}
if let channel = chatPresentationInterfaceState.renderedPeer?.peer as? TelegramChannel, channel.flags.contains(.isForum) {
if let channel = chatPresentationInterfaceState.renderedPeer?.peer as? TelegramChannel, channel.isForumOrMonoForum {
let topicListDisplayMode = chatPresentationInterfaceState.topicListDisplayMode ?? .top
if case .top = topicListDisplayMode, let peerId = chatPresentationInterfaceState.chatLocation.peerId {
if let currentPanel = currentPanel as? ChatTopicListTitleAccessoryPanelNode {
@@ -252,7 +252,7 @@ func sidePanelForChatPresentationInterfaceState(_ chatPresentationInterfaceState
}
if let channel = chatPresentationInterfaceState.renderedPeer?.peer as? TelegramChannel, channel.flags.contains(.isForum) {
if let channel = chatPresentationInterfaceState.renderedPeer?.peer as? TelegramChannel, channel.isForumOrMonoForum {
let topicListDisplayMode = chatPresentationInterfaceState.topicListDisplayMode ?? .top
if case .side = topicListDisplayMode {
return AnyComponentWithIdentity(