Disable tap

This commit is contained in:
Ali 2020-10-20 22:01:00 +04:00
parent a913f14472
commit 6ac330fb33
2 changed files with 4 additions and 3 deletions

View File

@ -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?

View File

@ -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