From 8649f7b92fbccd7517a25b62beb6bc4d790d7044 Mon Sep 17 00:00:00 2001 From: Gimir Date: Tue, 26 Nov 2024 16:34:53 +0300 Subject: [PATCH] fix(chat): hide context menu in select mode (Issue #2663) (#2671) Co-authored-by: Magomed-Elbi Dzhukalaev --- apps/chat/src/components/Chat/ChatHeader.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/chat/src/components/Chat/ChatHeader.tsx b/apps/chat/src/components/Chat/ChatHeader.tsx index b53e79dd9..3f62b0eda 100644 --- a/apps/chat/src/components/Chat/ChatHeader.tsx +++ b/apps/chat/src/components/Chat/ChatHeader.tsx @@ -86,6 +86,9 @@ export const ChatHeader = ({ const isExternal = useAppSelector( ConversationsSelectors.selectAreSelectedConversationsExternal, ); + const isSelectMode = useAppSelector( + ConversationsSelectors.selectIsSelectMode, + ); const isIsolatedView = useAppSelector(SettingsSelectors.selectIsIsolatedView); const isChatbarEnabled = useAppSelector((state) => SettingsSelectors.isFeatureEnabled(state, Feature.ConversationsSection), @@ -104,7 +107,8 @@ export const ChatHeader = ({ ConversationsSelectors.selectSelectedConversations, ); - const isContextMenuVisible = !isIsolatedView && isChatbarEnabled; + const isContextMenuVisible = + !isIsolatedView && isChatbarEnabled && !isSelectMode; const isMessageStreaming = useMemo( () => selectedConversations.some((conv) => conv.isMessageStreaming),