Fix sticker packs list

This commit is contained in:
Ilya Laktyushin
2021-11-20 22:53:39 +04:00
parent 1f0f7bbac7
commit 96629b3d37

View File

@@ -1339,7 +1339,7 @@ final class ChatMediaInputNode: ChatInputNode {
self.panelFocusTimer?.invalidate() self.panelFocusTimer?.invalidate()
} }
private func updateIsExpanded(_ isExpanded: Bool) { private func updateIsFocused(_ isExpanded: Bool) {
guard self.panelIsFocused != isExpanded else { guard self.panelIsFocused != isExpanded else {
return return
} }
@@ -2054,7 +2054,7 @@ final class ChatMediaInputNode: ChatInputNode {
panelHeight = standardInputHeight panelHeight = standardInputHeight
} }
self.updateIsExpanded(isFocused) self.updateIsFocused(isFocused)
if displaySearch { if displaySearch {
if let searchContainerNode = self.searchContainerNode { if let searchContainerNode = self.searchContainerNode {
@@ -2490,6 +2490,7 @@ final class ChatMediaInputNode: ChatInputNode {
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
if self.panelIsFocused { if self.panelIsFocused {
if point.y > -41.0 && point.y < 38.0 {
let convertedPoint = CGPoint(x: max(0.0, point.y), y: point.x) let convertedPoint = CGPoint(x: max(0.0, point.y), y: point.x)
if let result = self.listView.hitTest(convertedPoint, with: event) { if let result = self.listView.hitTest(convertedPoint, with: event) {
return result return result
@@ -2498,6 +2499,7 @@ final class ChatMediaInputNode: ChatInputNode {
return result return result
} }
} }
}
if let searchContainerNode = self.searchContainerNode { if let searchContainerNode = self.searchContainerNode {
if let result = searchContainerNode.hitTest(point.offsetBy(dx: -searchContainerNode.frame.minX, dy: -searchContainerNode.frame.minY), with: event) { if let result = searchContainerNode.hitTest(point.offsetBy(dx: -searchContainerNode.frame.minX, dy: -searchContainerNode.frame.minY), with: event) {
return result return result