Skip to content

Commit

Permalink
fix(chat): hide context menu in select mode (Issue #2663) (#2671)
Browse files Browse the repository at this point in the history
Co-authored-by: Magomed-Elbi Dzhukalaev <[email protected]>
  • Loading branch information
Gimir and Magomed-Elbi Dzhukalaev authored Nov 26, 2024
1 parent cbf7eb1 commit 8649f7b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/chat/src/components/Chat/ChatHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
Expand Down

0 comments on commit 8649f7b

Please sign in to comment.