From 6ac330fb331787106a435a8191e2790e5b998fce Mon Sep 17 00:00:00 2001 From: Ali <> Date: Tue, 20 Oct 2020 22:01:00 +0400 Subject: [PATCH] Disable tap --- submodules/TelegramUI/Sources/ChatController.swift | 2 +- submodules/TelegramUI/Sources/ChatTitleView.swift | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/submodules/TelegramUI/Sources/ChatController.swift b/submodules/TelegramUI/Sources/ChatController.swift index 9f1c1c5d8e..5dc393360d 100644 --- a/submodules/TelegramUI/Sources/ChatController.swift +++ b/submodules/TelegramUI/Sources/ChatController.swift @@ -2502,7 +2502,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G if let peer = peerViewMainPeer(peerView) { if case .pinnedMessages = strongSelf.presentationInterfaceState.subject { - strongSelf.chatTitleView?.titleContent = .custom(strongSelf.presentationData.strings.Chat_TitlePinnedMessages(Int32(pinnedCount ?? 1))) + strongSelf.chatTitleView?.titleContent = .custom(strongSelf.presentationData.strings.Chat_TitlePinnedMessages(Int32(pinnedCount ?? 1)), false) } else { strongSelf.chatTitleView?.titleContent = .peer(peerView: peerView, onlineMemberCount: onlineMemberCount, isScheduledMessages: isScheduledMessages) let imageOverride: AvatarNodeImageOverride? diff --git a/submodules/TelegramUI/Sources/ChatTitleView.swift b/submodules/TelegramUI/Sources/ChatTitleView.swift index a3a0e99ec4..cdb02185db 100644 --- a/submodules/TelegramUI/Sources/ChatTitleView.swift +++ b/submodules/TelegramUI/Sources/ChatTitleView.swift @@ -26,7 +26,7 @@ enum ChatTitleContent { case peer(peerView: PeerView, onlineMemberCount: Int32?, isScheduledMessages: Bool) case replyThread(type: ReplyThreadType, count: Int) - case custom(String) + case custom(String, Bool) } private enum ChatTitleIcon { @@ -203,8 +203,9 @@ final class ChatTitleView: UIView, NavigationBarTitleView { } isEnabled = false - case let .custom(text): + case let .custom(text, enabled): segments = [.text(0, NSAttributedString(string: text, font: Font.medium(17.0), textColor: titleTheme.rootController.navigationBar.primaryTextColor))] + isEnabled = enabled } var updated = false