Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3559620
D3184.id9671.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3184.id9671.diff
View Options
diff --git a/web/chat/chat-thread-list-item.react.js b/web/chat/chat-thread-list-item.react.js
--- a/web/chat/chat-thread-list-item.react.js
+++ b/web/chat/chat-thread-list-item.react.js
@@ -25,8 +25,14 @@
};
function ChatThreadListItem(props: Props): React.Node {
const { item, setModal } = props;
- const { threadInfo, lastUpdatedTimeIncludingSidebars } = item;
- const threadID = item.threadInfo.id;
+ const {
+ threadInfo,
+ lastUpdatedTimeIncludingSidebars,
+ mostRecentNonLocalMessage,
+ mostRecentMessageInfo,
+ } = item;
+ const { id: threadID, currentUser } = threadInfo;
+
const ancestorThreads = useAncestorThreads(threadInfo);
const onClick = useOnClickThread(item.threadInfo);
@@ -46,7 +52,7 @@
[active],
);
- const { unread } = item.threadInfo.currentUser;
+ const { unread } = currentUser;
const titleClassName = React.useMemo(
() =>
classNames({
@@ -126,19 +132,19 @@
<a className={css.threadButton} onClick={onClick}>
<p className={breadCrumbsClassName}>{ancestorPath}</p>
<div className={css.threadRow}>
- <div className={titleClassName}>{item.threadInfo.uiName}</div>
+ <div className={titleClassName}>{threadInfo.uiName}</div>
</div>
<div className={css.threadRow}>
<MessagePreview
- messageInfo={item.mostRecentMessageInfo}
- threadInfo={item.threadInfo}
+ messageInfo={mostRecentMessageInfo}
+ threadInfo={threadInfo}
/>
</div>
</a>
<div>
<ChatThreadListItemMenu
- threadInfo={item.threadInfo}
- mostRecentNonLocalMessage={item.mostRecentNonLocalMessage}
+ threadInfo={threadInfo}
+ mostRecentNonLocalMessage={mostRecentNonLocalMessage}
/>
<div className={lastActivityClassName}>{lastActivity}</div>
</div>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 28, 6:18 AM (6 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2714856
Default Alt Text
D3184.id9671.diff (1 KB)
Attached To
Mode
D3184: [web] [refator] Chat thread list
Attached
Detach File
Event Timeline
Log In to Comment