diff --git a/apps/meteor/client/components/message/toolbar/MessageToolbar.tsx b/apps/meteor/client/components/message/toolbar/MessageToolbar.tsx index 874bdd645f0f..e64acfc40c5a 100644 --- a/apps/meteor/client/components/message/toolbar/MessageToolbar.tsx +++ b/apps/meteor/client/components/message/toolbar/MessageToolbar.tsx @@ -41,7 +41,6 @@ import { useMessageActionAppsActionButtons } from '../../../hooks/useAppActionBu import { useEmbeddedLayout } from '../../../hooks/useEmbeddedLayout'; import { roomsQueryKeys } from '../../../lib/queryKeys'; import EmojiElement from '../../../views/composer/EmojiPicker/EmojiElement'; -import { useIsSelecting } from '../../../views/room/MessageList/contexts/SelectedMessagesContext'; const getMessageContext = (message: IMessage, room: IRoom, context?: MessageActionContext): MessageActionContext => { if (context) { @@ -108,19 +107,16 @@ const MessageToolbar = ({ useForwardMessageAction(message); useJumpToMessageContextAction(message, { id: 'jump-to-message', - order: 100, context: ['mentions', 'threads', 'videoconf-threads', 'message-mobile', 'search'], }); useJumpToMessageContextAction(message, { id: 'jump-to-pin-message', - order: 100, hidden: !subscription, context: ['pinned', 'direct'], }); useJumpToMessageContextAction(message, { id: 'jump-to-star-message', hidden: !allowStarring || !subscription, - order: 100, context: ['starred'], }); @@ -166,9 +162,7 @@ const MessageToolbar = ({ keepPreviousData: true, }); - const selecting = useIsSelecting(); - - if (selecting || (!data?.message.length && !data?.menu.length)) { + if (!data?.message.length && !data?.menu.length) { return null; } diff --git a/apps/meteor/client/components/message/toolbar/useJumpToMessageContextAction.tsx b/apps/meteor/client/components/message/toolbar/useJumpToMessageContextAction.tsx index f225e8fc81f7..d8f9dd912e48 100644 --- a/apps/meteor/client/components/message/toolbar/useJumpToMessageContextAction.tsx +++ b/apps/meteor/client/components/message/toolbar/useJumpToMessageContextAction.tsx @@ -7,7 +7,7 @@ import { setMessageJumpQueryStringParameter } from '../../../lib/utils/setMessag export const useJumpToMessageContextAction = ( message: IMessage, - { id, order, hidden, context }: { id: string; order: number; hidden?: boolean; context: MessageActionContext[] }, + { id, hidden, context }: { id: string; hidden?: boolean; context: MessageActionContext[] }, ) => { useEffect(() => { if (hidden) { @@ -22,12 +22,12 @@ export const useJumpToMessageContextAction = ( async action() { setMessageJumpQueryStringParameter(message._id); }, - order, + order: 100, group: 'message', }); return () => { MessageAction.removeButton(id); }; - }, [hidden, context, id, message._id, order]); + }, [hidden, context, id, message._id]); }; diff --git a/apps/meteor/client/components/message/variants/RoomMessage.tsx b/apps/meteor/client/components/message/variants/RoomMessage.tsx index bf5c12a9a6dd..8dec6c9abbaa 100644 --- a/apps/meteor/client/components/message/variants/RoomMessage.tsx +++ b/apps/meteor/client/components/message/variants/RoomMessage.tsx @@ -110,7 +110,7 @@ const RoomMessage = ({ )} - {!message.private && message?.e2e !== 'pending' && } + {!message.private && message?.e2e !== 'pending' && !selecting && } ); };