[WIP] Monoforums

This commit is contained in:
Isaac
2025-05-10 18:02:55 +01:00
parent 0e119dd6f1
commit 140efd6cfd
70 changed files with 666 additions and 669 deletions

View File

@@ -89,7 +89,10 @@ final class ChatRestrictedInputPanelNode: ChatInputPanelNode {
if let context = self.context {
accountFreezeConfiguration = AccountFreezeConfiguration.with(appConfiguration: context.currentAppConfiguration.with { $0 })
}
if let _ = accountFreezeConfiguration?.freezeUntilDate {
if let channel = interfaceState.renderedPeer?.chatMainPeer as? TelegramChannel, channel.isMonoForum {
//TODO:localize
self.textNode.attributedText = NSAttributedString(string: "Choose a thread to reply", font: Font.regular(13.0), textColor: interfaceState.theme.chat.inputPanel.secondaryTextColor)
} else if let _ = accountFreezeConfiguration?.freezeUntilDate {
self.textNode.attributedText = NSAttributedString(string: interfaceState.strings.Chat_PanelFrozenAccount_Title, font: Font.semibold(15.0), textColor: interfaceState.theme.list.itemDestructiveColor)
self.subtitleNode.attributedText = NSAttributedString(string: interfaceState.strings.Chat_PanelFrozenAccount_Text, font: Font.regular(13.0), textColor: interfaceState.theme.chat.inputPanel.secondaryTextColor)
isUserInteractionEnabled = true
@@ -128,8 +131,6 @@ final class ChatRestrictedInputPanelNode: ChatInputPanelNode {
displayCount = customChatContents.messageLimit ?? 20
case .businessLinkSetup:
displayCount = 0
case .postSuggestions:
displayCount = 0
}
self.textNode.attributedText = NSAttributedString(string: interfaceState.strings.Chat_QuickReplyMessageLimitReachedText(Int32(displayCount)), font: Font.regular(13.0), textColor: interfaceState.theme.chat.inputPanel.secondaryTextColor)
}