From 787b8483c4bea73f5174eaceaae67330b70d52b1 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Fri, 18 Nov 2022 02:34:08 +0400 Subject: [PATCH] Fix chat list header hitTest --- .../Sources/ChatListHeaderComponent.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/submodules/TelegramUI/Components/ChatListHeaderComponent/Sources/ChatListHeaderComponent.swift b/submodules/TelegramUI/Components/ChatListHeaderComponent/Sources/ChatListHeaderComponent.swift index 2fa2829f2f..496bd0297c 100644 --- a/submodules/TelegramUI/Components/ChatListHeaderComponent/Sources/ChatListHeaderComponent.swift +++ b/submodules/TelegramUI/Components/ChatListHeaderComponent/Sources/ChatListHeaderComponent.swift @@ -296,12 +296,6 @@ public final class ChatListHeaderComponent: Component { } override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { - if let view = self.titleContentView?.view, let result = view.hitTest(self.convert(point, to: view), with: event) { - return result - } - if let view = self.chatListTitleView, let result = view.hitTest(self.convert(point, to: view), with: event) { - return result - } if let backButtonView = self.backButtonView { if let result = backButtonView.hitTest(self.convert(point, to: backButtonView), with: event) { return result @@ -317,6 +311,12 @@ public final class ChatListHeaderComponent: Component { return result } } + if let view = self.titleContentView?.view, let result = view.hitTest(self.convert(point, to: view), with: event) { + return result + } + if let view = self.chatListTitleView, let result = view.hitTest(self.convert(point, to: view), with: event) { + return result + } return nil }