Indicate that a topic is closed in View as messages

This commit is contained in:
Isaac
2023-11-24 01:38:48 +04:00
parent b631780d00
commit 3aaa0ad17b
4 changed files with 22 additions and 3 deletions

View File

@@ -197,6 +197,15 @@ func inputPanelForChatPresentationIntefaceState(_ chatPresentationInterfaceState
return (panel, nil)
}
}
} else if let replyMessage = chatPresentationInterfaceState.replyMessage, let threadInfo = replyMessage.associatedThreadInfo, threadInfo.isClosed {
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)
}
}
}