From 2e20138a3c6e4740c76f615e5537df2ab29a5a3f Mon Sep 17 00:00:00 2001 From: Peter <> Date: Thu, 8 Aug 2019 13:23:04 +0300 Subject: [PATCH] Fix context menu on grouped messages --- .../ChatMessageContextControllerContentSource.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/TelegramUI/TelegramUI/ChatMessageContextControllerContentSource.swift b/submodules/TelegramUI/TelegramUI/ChatMessageContextControllerContentSource.swift index d59840356c..e7014b23ac 100644 --- a/submodules/TelegramUI/TelegramUI/ChatMessageContextControllerContentSource.swift +++ b/submodules/TelegramUI/TelegramUI/ChatMessageContextControllerContentSource.swift @@ -26,7 +26,7 @@ final class ChatMessageContextControllerContentSource: ContextControllerContentS guard let item = itemNode.item else { return } - if item.message.stableId == self.message.stableId, let contentNode = itemNode.getMessageContextSourceNode() { + if item.content.contains(where: { $0.stableId == self.message.stableId }), let contentNode = itemNode.getMessageContextSourceNode() { result = ContextControllerTakeViewInfo(contentContainingNode: contentNode, contentAreaInScreenSpace: chatNode.convert(chatNode.frameForVisibleArea(), to: nil)) } } @@ -46,7 +46,7 @@ final class ChatMessageContextControllerContentSource: ContextControllerContentS guard let item = itemNode.item else { return } - if item.message.stableId == self.message.stableId { + if item.content.contains(where: { $0.stableId == self.message.stableId }) { result = ContextControllerPutBackViewInfo(contentAreaInScreenSpace: chatNode.convert(chatNode.frameForVisibleArea(), to: nil)) } }