mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
[WIP] Pinned messages update
This commit is contained in:
@@ -55,6 +55,18 @@ func inputPanelForChatPresentationIntefaceState(_ chatPresentationInterfaceState
|
||||
return (panel, nil)
|
||||
}
|
||||
}
|
||||
|
||||
if case .pinnedMessages = chatPresentationInterfaceState.subject {
|
||||
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 chatPresentationInterfaceState.peerIsBlocked {
|
||||
if let currentPanel = (currentPanel as? ChatUnblockInputPanelNode) ?? (currentSecondaryPanel as? ChatUnblockInputPanelNode) {
|
||||
currentPanel.interfaceInteraction = interfaceInteraction
|
||||
@@ -195,7 +207,13 @@ func inputPanelForChatPresentationIntefaceState(_ chatPresentationInterfaceState
|
||||
}
|
||||
|
||||
var displayBotStartPanel = false
|
||||
if !chatPresentationInterfaceState.isScheduledMessages {
|
||||
|
||||
var isScheduledMessages = false
|
||||
if case .scheduledMessages = chatPresentationInterfaceState.subject {
|
||||
isScheduledMessages = true
|
||||
}
|
||||
|
||||
if !isScheduledMessages {
|
||||
if let _ = chatPresentationInterfaceState.botStartPayload {
|
||||
if let user = chatPresentationInterfaceState.renderedPeer?.peer as? TelegramUser, user.botInfo != nil {
|
||||
displayBotStartPanel = true
|
||||
|
||||
Reference in New Issue
Block a user