From f4a5a28b3f69e27bef4a06be87a20804b8e9287d Mon Sep 17 00:00:00 2001 From: Tasso Date: Mon, 9 Dec 2024 11:58:25 -0300 Subject: [PATCH] Minor issue --- .../message/toolbar/MessageToolbar.tsx | 45 ++++++++++--------- .../toolbar/useReplyInThreadMessageAction.ts | 4 +- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/apps/meteor/client/components/message/toolbar/MessageToolbar.tsx b/apps/meteor/client/components/message/toolbar/MessageToolbar.tsx index dcc9d1332b07..874bdd645f0f 100644 --- a/apps/meteor/client/components/message/toolbar/MessageToolbar.tsx +++ b/apps/meteor/client/components/message/toolbar/MessageToolbar.tsx @@ -98,28 +98,14 @@ const MessageToolbar = ({ const starsAction = useMessageActionAppsActionButtons(message, context, 'ai'); - const { messageToolbox: hiddenActions } = useLayoutHiddenActions(); - const allowStarring = useSetting('Message_AllowStarring'); + const hiddenActions = useLayoutHiddenActions().messageToolbox; + const allowStarring = useSetting('Message_AllowStarring', true); // TODO: move this to another place - useWebDAVMessageAction(message, { subscription }); - useNewDiscussionMessageAction(message, { user, room, subscription }); - useUnpinMessageAction(message, { room, subscription }); - usePinMessageAction(message, { room, subscription }); - useStarMessageAction(message, { room, user }); - useUnstarMessageAction(message, { room, user }); - usePermalinkAction(message, { subscription, id: 'permalink-star', context: ['starred'], order: 10 }); - usePermalinkAction(message, { subscription, id: 'permalink-pinned', context: ['pinned'], order: 5 }); - usePermalinkAction(message, { - subscription, - id: 'permalink', - context: ['message', 'message-mobile', 'threads', 'federated', 'videoconf', 'videoconf-threads'], - type: 'duplication', - order: 5, - }); - useFollowMessageAction(message, { room, user, context }); - useUnFollowMessageAction(message, { room, user, context }); + useReactionMessageAction(message, { user, room, subscription }); + useQuoteMessageAction(message, { subscription }); useReplyInThreadMessageAction(message, { room, subscription }); + useForwardMessageAction(message); useJumpToMessageContextAction(message, { id: 'jump-to-message', order: 100, @@ -137,13 +123,28 @@ const MessageToolbar = ({ order: 100, context: ['starred'], }); - useReactionMessageAction(message, { user, room, subscription }); + + useWebDAVMessageAction(message, { subscription }); + useNewDiscussionMessageAction(message, { user, room, subscription }); + useUnpinMessageAction(message, { room, subscription }); + usePinMessageAction(message, { room, subscription }); + useStarMessageAction(message, { room, user }); + useUnstarMessageAction(message, { room, user }); + usePermalinkAction(message, { subscription, id: 'permalink-star', context: ['starred'], order: 10 }); + usePermalinkAction(message, { subscription, id: 'permalink-pinned', context: ['pinned'], order: 5 }); + usePermalinkAction(message, { + subscription, + id: 'permalink', + context: ['message', 'message-mobile', 'threads', 'federated', 'videoconf', 'videoconf-threads'], + type: 'duplication', + order: 5, + }); + useFollowMessageAction(message, { room, user, context }); + useUnFollowMessageAction(message, { room, user, context }); useMarkAsUnreadMessageAction(message, { user, room, subscription }); useTranslateAction(message, { user, room, subscription }); useViewOriginalTranslationAction(message, { user, room, subscription }); useReplyInDMAction(message, { user, room, subscription }); - useForwardMessageAction(message); - useQuoteMessageAction(message, { subscription }); useCopyAction(message, { subscription }); useEditMessageAction(message, { user, room, subscription }); useDeleteMessageAction(message, { user, room, subscription }); diff --git a/apps/meteor/client/components/message/toolbar/useReplyInThreadMessageAction.ts b/apps/meteor/client/components/message/toolbar/useReplyInThreadMessageAction.ts index 1920ae68dd36..0fae8e99029b 100644 --- a/apps/meteor/client/components/message/toolbar/useReplyInThreadMessageAction.ts +++ b/apps/meteor/client/components/message/toolbar/useReplyInThreadMessageAction.ts @@ -41,6 +41,8 @@ export const useReplyInThreadMessageAction = ( group: 'message', }); - return () => MessageAction.removeButton('unfollow-message'); + return () => { + MessageAction.removeButton('reply-in-thread'); + }; }, [message._id, message.tmid, room, route, subscription, threadsEnabled]); };