[WIP] Monoforums

This commit is contained in:
Isaac
2025-05-14 00:50:46 +08:00
parent 9e18743b1b
commit f90402102b
36 changed files with 1191 additions and 340 deletions

View File

@@ -231,15 +231,16 @@ func inputPanelForChatPresentationIntefaceState(_ chatPresentationInterfaceState
if channel.flags.contains(.isMonoforum) {
if channel.adminRights != nil, case .peer = chatPresentationInterfaceState.chatLocation {
displayInputTextPanel = false
if let currentPanel = (currentPanel as? ChatRestrictedInputPanelNode) ?? (currentSecondaryPanel as? ChatRestrictedInputPanelNode) {
return (currentPanel, nil)
} else {
let panel = ChatRestrictedInputPanelNode()
panel.context = context
panel.interfaceInteraction = interfaceInteraction
return (panel, nil)
if chatPresentationInterfaceState.interfaceState.replyMessageSubject == nil {
displayInputTextPanel = false
if let currentPanel = (currentPanel as? ChatRestrictedInputPanelNode) ?? (currentSecondaryPanel as? ChatRestrictedInputPanelNode) {
return (currentPanel, nil)
} else {
let panel = ChatRestrictedInputPanelNode()
panel.context = context
panel.interfaceInteraction = interfaceInteraction
return (panel, nil)
}
}
} else {
displayInputTextPanel = true