mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Various improvements
This commit is contained in:
@@ -8,6 +8,7 @@ import ChatControllerInteraction
|
||||
import AccessoryPanelNode
|
||||
import ForwardAccessoryPanelNode
|
||||
import ReplyAccessoryPanelNode
|
||||
import SuggestPostAccessoryPanelNode
|
||||
|
||||
func accessoryPanelForChatPresentationIntefaceState(_ chatPresentationInterfaceState: ChatPresentationInterfaceState, context: AccountContext, currentPanel: AccessoryPanelNode?, chatControllerInteraction: ChatControllerInteraction?, interfaceInteraction: ChatPanelInterfaceInteraction?) -> AccessoryPanelNode? {
|
||||
if case .standard(.previewing) = chatPresentationInterfaceState.mode {
|
||||
@@ -92,6 +93,16 @@ func accessoryPanelForChatPresentationIntefaceState(_ chatPresentationInterfaceS
|
||||
return nil
|
||||
}
|
||||
}
|
||||
} else if chatPresentationInterfaceState.interfaceState.postSuggestionState != nil {
|
||||
if let replyPanelNode = currentPanel as? SuggestPostAccessoryPanelNode {
|
||||
replyPanelNode.interfaceInteraction = interfaceInteraction
|
||||
replyPanelNode.updateThemeAndStrings(theme: chatPresentationInterfaceState.theme, strings: chatPresentationInterfaceState.strings)
|
||||
return replyPanelNode
|
||||
} else {
|
||||
let panelNode = SuggestPostAccessoryPanelNode(context: context, theme: chatPresentationInterfaceState.theme, strings: chatPresentationInterfaceState.strings, nameDisplayOrder: chatPresentationInterfaceState.nameDisplayOrder, dateTimeFormat: chatPresentationInterfaceState.dateTimeFormat, animationCache: chatControllerInteraction?.presentationContext.animationCache, animationRenderer: chatControllerInteraction?.presentationContext.animationRenderer)
|
||||
panelNode.interfaceInteraction = interfaceInteraction
|
||||
return panelNode
|
||||
}
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user