diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js --- a/lib/shared/thread-utils.js +++ b/lib/shared/thread-utils.js @@ -421,12 +421,19 @@ }; } -function createPendingSidebar( - sourceMessageInfo: ComposableMessageInfo | RobotextMessageInfo, - parentThreadInfo: ThreadInfo, - viewerID: string, - markdownRules: ParserRules, -): ThreadInfo { +type CreatePendingSidebarInput = { + +sourceMessageInfo: ComposableMessageInfo | RobotextMessageInfo, + +parentThreadInfo: ThreadInfo, + +viewerID: string, + +markdownRules: ParserRules, +}; +function createPendingSidebar(input: CreatePendingSidebarInput): ThreadInfo { + const { + sourceMessageInfo, + parentThreadInfo, + viewerID, + markdownRules, + } = input; const { color, type: parentThreadType } = parentThreadInfo; const messageTitleEntityText = getMessageTitle( diff --git a/native/chat/sidebar-navigation.js b/native/chat/sidebar-navigation.js --- a/native/chat/sidebar-navigation.js +++ b/native/chat/sidebar-navigation.js @@ -26,12 +26,12 @@ } const { messageInfo, threadInfo } = sourceMessage; - return createPendingSidebar( - messageInfo, - threadInfo, + return createPendingSidebar({ + sourceMessageInfo: messageInfo, + parentThreadInfo: threadInfo, viewerID, - getDefaultTextMessageRules().simpleMarkdownRules, - ); + markdownRules: getDefaultTextMessageRules().simpleMarkdownRules, + }); } function useNavigateToSidebar(item: ChatMessageInfoItemWithHeight): () => void { diff --git a/web/selectors/thread-selectors.js b/web/selectors/thread-selectors.js --- a/web/selectors/thread-selectors.js +++ b/web/selectors/thread-selectors.js @@ -64,12 +64,12 @@ if (!viewerID) { return; } - const pendingSidebarInfo = createPendingSidebar( - messageInfo, - threadInfo, + const pendingSidebarInfo = createPendingSidebar({ + sourceMessageInfo: messageInfo, + parentThreadInfo: threadInfo, viewerID, - getDefaultTextMessageRules().simpleMarkdownRules, - ); + markdownRules: getDefaultTextMessageRules().simpleMarkdownRules, + }); dispatch({ type: updateNavInfoActionType, payload: {