Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3293896
D6564.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D6564.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D6564: [lib] Pass object of props into createPendingSidebar
Attached
Detach File
Event Timeline
Log In to Comment