Page MenuHomePhabricator

D6564.diff
No OneTemporary

D6564.diff

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: {

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 6:24 PM (21 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2530975
Default Alt Text
D6564.diff (2 KB)

Event Timeline