mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Various improvements
This commit is contained in:
@@ -121,6 +121,7 @@ public final class EntityKeyboardComponent: Component {
|
||||
public let displayBottomPanel: Bool
|
||||
public let isExpanded: Bool
|
||||
public let clipContentToTopPanel: Bool
|
||||
public let useExternalSearchContainer: Bool
|
||||
public let hidePanels: Bool
|
||||
|
||||
public init(
|
||||
@@ -153,6 +154,7 @@ public final class EntityKeyboardComponent: Component {
|
||||
displayBottomPanel: Bool,
|
||||
isExpanded: Bool,
|
||||
clipContentToTopPanel: Bool,
|
||||
useExternalSearchContainer: Bool,
|
||||
hidePanels: Bool = false
|
||||
) {
|
||||
self.theme = theme
|
||||
@@ -184,6 +186,7 @@ public final class EntityKeyboardComponent: Component {
|
||||
self.displayBottomPanel = displayBottomPanel
|
||||
self.isExpanded = isExpanded
|
||||
self.clipContentToTopPanel = clipContentToTopPanel
|
||||
self.useExternalSearchContainer = useExternalSearchContainer
|
||||
self.hidePanels = hidePanels
|
||||
}
|
||||
|
||||
@@ -248,6 +251,9 @@ public final class EntityKeyboardComponent: Component {
|
||||
if lhs.clipContentToTopPanel != rhs.clipContentToTopPanel {
|
||||
return false
|
||||
}
|
||||
if lhs.useExternalSearchContainer != rhs.useExternalSearchContainer {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
@@ -908,14 +914,20 @@ public final class EntityKeyboardComponent: Component {
|
||||
contentType = .stickers
|
||||
}
|
||||
|
||||
self.searchComponent = EntitySearchContentComponent(
|
||||
makeContainerNode: {
|
||||
return component.makeSearchContainerNode(contentType)
|
||||
},
|
||||
dismissSearch: { [weak self] in
|
||||
self?.closeSearch()
|
||||
}
|
||||
)
|
||||
if component.useExternalSearchContainer, let containerNode = component.makeSearchContainerNode(contentType) {
|
||||
let controller = EntitySearchContainerController(containerNode: containerNode)
|
||||
|
||||
self.component?.emojiContent?.inputInteractionHolder.inputInteraction?.pushController(controller)
|
||||
} else {
|
||||
self.searchComponent = EntitySearchContentComponent(
|
||||
makeContainerNode: {
|
||||
return component.makeSearchContainerNode(contentType)
|
||||
},
|
||||
dismissSearch: { [weak self] in
|
||||
self?.closeSearch()
|
||||
}
|
||||
)
|
||||
}
|
||||
//self.state?.updated(transition: Transition(animation: .curve(duration: 0.3, curve: .spring)))
|
||||
component.hideInputUpdated(true, true, Transition(animation: .curve(duration: 0.3, curve: .spring)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user