Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3498472
D6613.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
D6613.diff
View Options
diff --git a/web/modals/threads/sidebars/sidebar.react.js b/web/modals/threads/sidebars/sidebar.react.js
--- a/web/modals/threads/sidebars/sidebar.react.js
+++ b/web/modals/threads/sidebars/sidebar.react.js
@@ -1,4 +1,5 @@
// @flow
+
import classNames from 'classnames';
import * as React from 'react';
@@ -6,6 +7,7 @@
import type { ChatThreadItem } from 'lib/selectors/chat-selectors';
import { useMessagePreview } from 'lib/shared/message-utils';
import { shortAbsoluteDate } from 'lib/utils/date-utils';
+import { useResolvedThreadInfo } from 'lib/utils/entity-helpers';
import Button from '../../../components/button.react';
import { getDefaultTextMessageRules } from '../../../markdown/rules.react';
@@ -65,6 +67,7 @@
);
}, [lastActivity, messagePreviewResult]);
+ const { uiName } = useResolvedThreadInfo(threadInfo);
return (
<Button className={css.sidebarContainer} onClick={onClickThread}>
<img
@@ -77,7 +80,7 @@
alt="sidebar arrow"
/>
<div className={sidebarInfoClassName}>
- <div className={css.longTextEllipsis}>{threadInfo.uiName}</div>
+ <div className={css.longTextEllipsis}>{uiName}</div>
<div className={css.lastMessage}>{lastMessage}</div>
</div>
</Button>
diff --git a/web/modals/threads/subchannels/subchannel.react.js b/web/modals/threads/subchannels/subchannel.react.js
--- a/web/modals/threads/subchannels/subchannel.react.js
+++ b/web/modals/threads/subchannels/subchannel.react.js
@@ -7,6 +7,7 @@
import { type ChatThreadItem } from 'lib/selectors/chat-selectors';
import { useMessagePreview } from 'lib/shared/message-utils';
import { shortAbsoluteDate } from 'lib/utils/date-utils';
+import { useResolvedThreadInfo } from 'lib/utils/entity-helpers';
import Button from '../../../components/button.react';
import { getDefaultTextMessageRules } from '../../../markdown/rules.react';
@@ -72,11 +73,12 @@
);
}, [lastActivity, messagePreviewResult]);
+ const { uiName } = useResolvedThreadInfo(threadInfo);
return (
<Button className={css.subchannelContainer} onClick={onClickThread}>
<SWMansionIcon icon="message-square" size={22} />
<div className={subchannelTitleClassName}>
- <div className={css.longTextEllipsis}>{threadInfo.uiName}</div>
+ <div className={css.longTextEllipsis}>{uiName}</div>
<div className={css.lastMessage}>{lastMessage}</div>
</div>
</Button>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 9:19 PM (17 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2683150
Default Alt Text
D6613.diff (2 KB)
Attached To
Mode
D6613: [web] Fetch ENS names in thread modals
Attached
Detach File
Event Timeline
Log In to Comment