Page MenuHomePhabricator

D3184.id9671.diff
No OneTemporary

D3184.id9671.diff

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

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)

Event Timeline