Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3498822
D6597.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
D6597.diff
View Options
diff --git a/native/chat/message-list-header-title.react.js b/native/chat/message-list-header-title.react.js
--- a/native/chat/message-list-header-title.react.js
+++ b/native/chat/message-list-header-title.react.js
@@ -9,6 +9,7 @@
import { View, Platform } from 'react-native';
import type { ThreadInfo } from 'lib/types/thread-types';
+import { useResolvedThreadInfo } from 'lib/utils/entity-helpers';
import { firstLine } from 'lib/utils/string-utils';
import Button from '../components/button.react';
@@ -26,6 +27,7 @@
type Props = {
...BaseProps,
+styles: typeof unboundStyles,
+ +title: string,
};
class MessageListHeaderTitle extends React.PureComponent<Props> {
render() {
@@ -35,6 +37,7 @@
isSearchEmpty,
areSettingsEnabled,
styles,
+ title,
...rest
} = this.props;
@@ -48,8 +51,6 @@
);
}
- const title = isSearchEmpty ? 'New Message' : threadInfo.uiName;
-
return (
<Button
onPress={this.onPress}
@@ -67,7 +68,7 @@
}
onPress = () => {
- const threadInfo = this.props.threadInfo;
+ const { threadInfo } = this.props;
this.props.navigate<'ThreadSettings'>({
name: ThreadSettingsRouteName,
params: { threadInfo },
@@ -106,7 +107,11 @@
function ConnectedMessageListHeaderTitle(props: BaseProps) {
const styles = useStyles(unboundStyles);
- return <MessageListHeaderTitle {...props} styles={styles} />;
+ const { uiName } = useResolvedThreadInfo(props.threadInfo);
+ const { isSearchEmpty } = props;
+ const title = isSearchEmpty ? 'New Message' : uiName;
+
+ return <MessageListHeaderTitle {...props} styles={styles} title={title} />;
},
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 9:41 PM (17 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2683397
Default Alt Text
D6597.diff (1 KB)
Attached To
Mode
D6597: [native] Fetch ENS names in MessageListHeaderTitle
Attached
Detach File
Event Timeline
Log In to Comment