mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
UI improvements
This commit is contained in:
@@ -244,6 +244,7 @@ public final class ChatEntityKeyboardInputNode: ChatInputNode {
|
||||
private var currentInputData: InputData
|
||||
private var inputDataDisposable: Disposable?
|
||||
private var hasRecentGifsDisposable: Disposable?
|
||||
private let opaqueTopPanelBackground: Bool
|
||||
|
||||
private struct EmojiSearchResult {
|
||||
var groups: [EmojiPagerContentComponent.ItemGroup]
|
||||
@@ -569,10 +570,11 @@ public final class ChatEntityKeyboardInputNode: ChatInputNode {
|
||||
|
||||
private weak var currentUndoOverlayController: UndoOverlayController?
|
||||
|
||||
public init(context: AccountContext, currentInputData: InputData, updatedInputData: Signal<InputData, NoError>, defaultToEmojiTab: Bool, controllerInteraction: ChatControllerInteraction?, interfaceInteraction: ChatPanelInterfaceInteraction?, chatPeerId: PeerId?) {
|
||||
public init(context: AccountContext, currentInputData: InputData, updatedInputData: Signal<InputData, NoError>, defaultToEmojiTab: Bool, opaqueTopPanelBackground: Bool = false, controllerInteraction: ChatControllerInteraction?, interfaceInteraction: ChatPanelInterfaceInteraction?, chatPeerId: PeerId?) {
|
||||
self.context = context
|
||||
self.currentInputData = currentInputData
|
||||
self.defaultToEmojiTab = defaultToEmojiTab
|
||||
self.opaqueTopPanelBackground = opaqueTopPanelBackground
|
||||
|
||||
self.controllerInteraction = controllerInteraction
|
||||
|
||||
@@ -1771,7 +1773,7 @@ public final class ChatEntityKeyboardInputNode: ChatInputNode {
|
||||
defaultToEmojiTab: self.defaultToEmojiTab,
|
||||
externalTopPanelContainer: self.externalTopPanelContainerImpl,
|
||||
externalBottomPanelContainer: nil,
|
||||
displayTopPanelBackground: false,
|
||||
displayTopPanelBackground: self.opaqueTopPanelBackground ? .opaque : .none,
|
||||
topPanelExtensionUpdated: { [weak self] topPanelExtension, transition in
|
||||
guard let strongSelf = self else {
|
||||
return
|
||||
@@ -2332,17 +2334,19 @@ public final class EntityInputView: UIInputView, AttachmentTextInputPanelInputVi
|
||||
)
|
||||
},
|
||||
defaultToEmojiTab: true,
|
||||
opaqueTopPanelBackground: true,
|
||||
controllerInteraction: nil,
|
||||
interfaceInteraction: nil,
|
||||
chatPeerId: nil
|
||||
)
|
||||
self.inputNode = inputNode
|
||||
inputNode.clipContentToTopPanel = hideBackground
|
||||
inputNode.clipContentToTopPanel = true
|
||||
inputNode.emojiInputInteraction = inputInteraction
|
||||
inputNode.externalTopPanelContainerImpl = nil
|
||||
inputNode.switchToTextInput = { [weak self] in
|
||||
self?.switchToKeyboard?()
|
||||
}
|
||||
inputNode.backgroundColor = self.presentationData.theme.chat.inputMediaPanel.backgroundColor
|
||||
self.addSubnode(inputNode)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user