From 8a8af27f9a88fa29e544fa257ebecbf65e76d617 Mon Sep 17 00:00:00 2001 From: Peter <> Date: Tue, 9 Jul 2019 19:45:04 +0400 Subject: [PATCH] Don't allow peek on invisible items --- submodules/TelegramUI/TelegramUI/ChatMediaInputNode.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/submodules/TelegramUI/TelegramUI/ChatMediaInputNode.swift b/submodules/TelegramUI/TelegramUI/ChatMediaInputNode.swift index 85f712d9a0..3e8fa70bff 100644 --- a/submodules/TelegramUI/TelegramUI/ChatMediaInputNode.swift +++ b/submodules/TelegramUI/TelegramUI/ChatMediaInputNode.swift @@ -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 {