Page MenuHomePhabricator

D6599.id22084.diff
No OneTemporary

D6599.id22084.diff

diff --git a/native/chat/sidebar-item.react.js b/native/chat/sidebar-item.react.js
--- a/native/chat/sidebar-item.react.js
+++ b/native/chat/sidebar-item.react.js
@@ -5,6 +5,7 @@
import type { SidebarInfo } from 'lib/types/thread-types';
import { shortAbsoluteDate } from 'lib/utils/date-utils';
+import { useResolvedThreadInfo } from 'lib/utils/entity-helpers';
import { SingleLine } from '../components/single-line.react';
import { useStyles } from '../themes/colors';
@@ -17,14 +18,13 @@
const lastActivity = shortAbsoluteDate(lastUpdatedTime);
const { threadInfo } = props.sidebarInfo;
+ const { uiName } = useResolvedThreadInfo(threadInfo);
const styles = useStyles(unboundStyles);
const unreadStyle = threadInfo.currentUser.unread ? styles.unread : null;
return (
<View style={styles.itemContainer}>
- <SingleLine style={[styles.name, unreadStyle]}>
- {threadInfo.uiName}
- </SingleLine>
+ <SingleLine style={[styles.name, unreadStyle]}>{uiName}</SingleLine>
<Text style={[styles.lastActivity, unreadStyle]}>{lastActivity}</Text>
</View>
);
diff --git a/native/chat/subchannel-item.react.js b/native/chat/subchannel-item.react.js
--- a/native/chat/subchannel-item.react.js
+++ b/native/chat/subchannel-item.react.js
@@ -5,6 +5,7 @@
import type { ChatThreadItem } from 'lib/selectors/chat-selectors';
import { shortAbsoluteDate } from 'lib/utils/date-utils';
+import { useResolvedThreadInfo } from 'lib/utils/entity-helpers';
import { SingleLine } from '../components/single-line.react';
import SWMansionIcon from '../components/swmansion-icon.react';
@@ -20,6 +21,7 @@
threadInfo,
mostRecentMessageInfo,
} = props.subchannelInfo;
+ const { uiName } = useResolvedThreadInfo(threadInfo);
const lastActivity = shortAbsoluteDate(lastUpdatedTime);
@@ -51,9 +53,7 @@
style={[styles.icon, unreadStyle]}
/>
</View>
- <SingleLine style={[styles.name, unreadStyle]}>
- {threadInfo.uiName}
- </SingleLine>
+ <SingleLine style={[styles.name, unreadStyle]}>{uiName}</SingleLine>
</View>
<View style={styles.itemRowContainer}>
{lastMessage}

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 2:10 AM (18 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2682853
Default Alt Text
D6599.id22084.diff (2 KB)

Event Timeline