diff --git a/submodules/TelegramUI/Components/Chat/ChatMessageAnimatedStickerItemNode/Sources/ChatMessageAnimatedStickerItemNode.swift b/submodules/TelegramUI/Components/Chat/ChatMessageAnimatedStickerItemNode/Sources/ChatMessageAnimatedStickerItemNode.swift index aaa4332abc..cfda050e1b 100644 --- a/submodules/TelegramUI/Components/Chat/ChatMessageAnimatedStickerItemNode/Sources/ChatMessageAnimatedStickerItemNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatMessageAnimatedStickerItemNode/Sources/ChatMessageAnimatedStickerItemNode.swift @@ -1510,12 +1510,10 @@ public class ChatMessageAnimatedStickerItemNode: ChatMessageItemView { if let replyBackgroundNode = strongSelf.replyBackgroundNode, let replyBackgroundFrame { replyBackgroundNode.frame = replyBackgroundFrame - let cornerRadius = replyBackgroundNode.frame.height <= 22.0 ? replyBackgroundNode.frame.height / 2.0 : 8.0 + let cornerRadius = 4.0 replyBackgroundNode.update(size: replyBackgroundNode.bounds.size, cornerRadius: cornerRadius, transition: .immediate) if let backgroundContent = strongSelf.replyBackgroundContent { - let cornerRadius = replyBackgroundNode.frame.height <= 22.0 ? replyBackgroundNode.frame.height / 2.0 : 8.0 - replyBackgroundNode.isHidden = true backgroundContent.cornerRadius = cornerRadius backgroundContent.frame = replyBackgroundNode.frame diff --git a/submodules/TelegramUI/Components/Chat/ChatMessageInstantVideoItemNode/Sources/ChatMessageInstantVideoItemNode.swift b/submodules/TelegramUI/Components/Chat/ChatMessageInstantVideoItemNode/Sources/ChatMessageInstantVideoItemNode.swift index b558eae069..ec6167071a 100644 --- a/submodules/TelegramUI/Components/Chat/ChatMessageInstantVideoItemNode/Sources/ChatMessageInstantVideoItemNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatMessageInstantVideoItemNode/Sources/ChatMessageInstantVideoItemNode.swift @@ -782,7 +782,7 @@ public class ChatMessageInstantVideoItemNode: ChatMessageItemView, UIGestureReco if let replyBackgroundNode = strongSelf.replyBackgroundNode, let replyBackgroundFrame { replyBackgroundNode.frame = replyBackgroundFrame - let cornerRadius = replyBackgroundNode.frame.height <= 22.0 ? replyBackgroundNode.frame.height / 2.0 : 8.0 + let cornerRadius = 4.0 replyBackgroundNode.update(size: replyBackgroundNode.bounds.size, cornerRadius: cornerRadius, transition: .immediate) } diff --git a/submodules/TelegramUI/Components/Chat/ChatMessageStickerItemNode/Sources/ChatMessageStickerItemNode.swift b/submodules/TelegramUI/Components/Chat/ChatMessageStickerItemNode/Sources/ChatMessageStickerItemNode.swift index ce84f89d42..f31a4623bc 100644 --- a/submodules/TelegramUI/Components/Chat/ChatMessageStickerItemNode/Sources/ChatMessageStickerItemNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatMessageStickerItemNode/Sources/ChatMessageStickerItemNode.swift @@ -1090,12 +1090,10 @@ public class ChatMessageStickerItemNode: ChatMessageItemView { if let replyBackgroundNode = strongSelf.replyBackgroundNode, let replyBackgroundFrame { replyBackgroundNode.frame = replyBackgroundFrame - let cornerRadius = replyBackgroundNode.frame.height <= 22.0 ? replyBackgroundNode.frame.height / 2.0 : 8.0 + let cornerRadius = 4.0 replyBackgroundNode.update(size: replyBackgroundNode.bounds.size, cornerRadius: cornerRadius, transition: .immediate) if let backgroundContent = strongSelf.replyBackgroundContent { - let cornerRadius = replyBackgroundNode.frame.height <= 22.0 ? replyBackgroundNode.frame.height / 2.0 : 8.0 - replyBackgroundNode.isHidden = true backgroundContent.cornerRadius = cornerRadius backgroundContent.frame = replyBackgroundNode.frame diff --git a/submodules/TelegramUI/Sources/ChatController.swift b/submodules/TelegramUI/Sources/ChatController.swift index a5090bf803..979a556a53 100644 --- a/submodules/TelegramUI/Sources/ChatController.swift +++ b/submodules/TelegramUI/Sources/ChatController.swift @@ -2016,7 +2016,29 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G }, openMessageContextActions: { message, node, rect, gesture in gesture?.cancel() }, navigateToMessage: { [weak self] fromId, id, params in - self?.navigateToMessage(from: fromId, to: .id(id, params), forceInCurrentChat: fromId.peerId == id.peerId) + guard let self else { + return + } + if params.quote != nil { + if let message = self.chatDisplayNode.historyNode.messageInCurrentHistoryView(fromId), let toPeer = message.peers[id.peerId] { + switch toPeer { + case let channel as TelegramChannel: + if channel.username == nil && channel.usernames.isEmpty { + switch channel.participationStatus { + case .kicked, .left: + self.controllerInteraction?.attemptedNavigationToPrivateQuote(toPeer) + return + case .member: + break + } + } + default: + break + } + } + } + + self.navigateToMessage(from: fromId, to: .id(id, params), forceInCurrentChat: fromId.peerId == id.peerId) }, navigateToMessageStandalone: { [weak self] id in self?.navigateToMessage(from: nil, to: .id(id, NavigateToMessageParams(timestamp: nil, quote: nil)), forceInCurrentChat: false) }, navigateToThreadMessage: { [weak self] peerId, threadId, messageId in