Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions ts/components/menu/ConversationListItemContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ const ConversationListItemContextMenu = (props: PropsContextConversationItem) =>
const disabledLegacyGroup = useDisableLegacyGroupDeprecatedActions(convoIdFromContext);
const isPinned = useIsPinned(convoIdFromContext);

if (isSearching) {
return null;
}

if (disabledLegacyGroup) {
return (
<SessionContextMenuContainer>
Expand All @@ -67,6 +63,28 @@ const ConversationListItemContextMenu = (props: PropsContextConversationItem) =>
);
}

if (isSearching) {
// When we are searching, we can sometimes find conversations that should have a limited set of actions,
// so here we have a whitelist of what can be done.

return (
<SessionContextMenuContainer>
<Menu id={triggerId} animation={getMenuAnimation()}>
<DeleteDeprecatedLegacyGroupMenuItem />
<PinConversationMenuItem />
<BlockMenuItem />
<CopyCommunityUrlMenuItem convoId={convoIdFromContext} />
<CopyAccountIdMenuItem pubkey={convoIdFromContext} />
<DeleteMessagesMenuItem />
<DeletePrivateConversationMenuItem />
<LeaveCommunityMenuItem />
<LeaveGroupMenuItem />
<DeleteGroupMenuItem />
</Menu>
</SessionContextMenuContainer>
);
}

return (
<SessionContextMenuContainer>
<Menu id={triggerId} animation={getMenuAnimation()}>
Expand Down
Loading