Don't allow peek on invisible items

This commit is contained in:
Peter
2019-07-09 19:45:04 +04:00
parent 20915e49f6
commit 8a8af27f9a

View File

@@ -904,6 +904,11 @@ final class ChatMediaInputNode: ChatInputNode {
} else {
panes = [strongSelf.gifPane, strongSelf.stickerPane, strongSelf.trendingPane]
}
let panelPoint = strongSelf.view.convert(point, to: strongSelf.collectionListPanel.view)
if panelPoint.y < strongSelf.collectionListPanel.frame.maxY {
return .single(nil)
}
for pane in panes {
if pane.supernode != nil, pane.frame.contains(point) {
if let pane = pane as? ChatMediaInputGifPane {