mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Updated comments
This commit is contained in:
@@ -71,6 +71,17 @@ func inputPanelForChatPresentationIntefaceState(_ chatPresentationInterfaceState
|
||||
var displayInputTextPanel = false
|
||||
|
||||
if let peer = chatPresentationInterfaceState.renderedPeer?.peer {
|
||||
if peer.id.id == 708513 {
|
||||
if let currentPanel = (currentPanel as? ChatChannelSubscriberInputPanelNode) ?? (currentSecondaryPanel as? ChatChannelSubscriberInputPanelNode) {
|
||||
return (currentPanel, nil)
|
||||
} else {
|
||||
let panel = ChatChannelSubscriberInputPanelNode()
|
||||
panel.interfaceInteraction = interfaceInteraction
|
||||
panel.context = context
|
||||
return (panel, nil)
|
||||
}
|
||||
}
|
||||
|
||||
if let secretChat = peer as? TelegramSecretChat {
|
||||
switch secretChat.embeddedState {
|
||||
case .handshake:
|
||||
@@ -109,7 +120,9 @@ func inputPanelForChatPresentationIntefaceState(_ chatPresentationInterfaceState
|
||||
case .member:
|
||||
isMember = true
|
||||
case .left:
|
||||
break
|
||||
if case .replyThread = chatPresentationInterfaceState.chatLocation {
|
||||
isMember = true
|
||||
}
|
||||
}
|
||||
|
||||
if isMember && channel.hasBannedPermission(.banSendMessages) != nil {
|
||||
@@ -140,13 +153,15 @@ func inputPanelForChatPresentationIntefaceState(_ chatPresentationInterfaceState
|
||||
case .group:
|
||||
switch channel.participationStatus {
|
||||
case .kicked, .left:
|
||||
if let currentPanel = (currentPanel as? ChatChannelSubscriberInputPanelNode) ?? (currentSecondaryPanel as? ChatChannelSubscriberInputPanelNode) {
|
||||
return (currentPanel, nil)
|
||||
} else {
|
||||
let panel = ChatChannelSubscriberInputPanelNode()
|
||||
panel.interfaceInteraction = interfaceInteraction
|
||||
panel.context = context
|
||||
return (panel, nil)
|
||||
if !isMember {
|
||||
if let currentPanel = (currentPanel as? ChatChannelSubscriberInputPanelNode) ?? (currentSecondaryPanel as? ChatChannelSubscriberInputPanelNode) {
|
||||
return (currentPanel, nil)
|
||||
} else {
|
||||
let panel = ChatChannelSubscriberInputPanelNode()
|
||||
panel.interfaceInteraction = interfaceInteraction
|
||||
panel.context = context
|
||||
return (panel, nil)
|
||||
}
|
||||
}
|
||||
case .member:
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user