Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3501177
D6601.id22014.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
D6601.id22014.diff
View Options
diff --git a/native/components/thread-list-thread.react.js b/native/components/thread-list-thread.react.js
--- a/native/components/thread-list-thread.react.js
+++ b/native/components/thread-list-thread.react.js
@@ -2,7 +2,8 @@
import * as React from 'react';
-import { type ThreadInfo } from 'lib/types/thread-types';
+import type { ThreadInfo, ResolvedThreadInfo } from 'lib/types/thread-types';
+import { useResolvedThreadInfo } from 'lib/utils/entity-helpers';
import { type Colors, useStyles, useColors } from '../themes/colors';
import type { ViewStyle, TextStyle } from '../types/styles';
@@ -10,14 +11,18 @@
import ColorSplotch from './color-splotch.react';
import { SingleLine } from './single-line.react';
-type BaseProps = {
- +threadInfo: ThreadInfo,
+type SharedProps = {
+onSelect: (threadID: string) => void,
+style?: ViewStyle,
+textStyle?: TextStyle,
};
+type BaseProps = {
+ ...SharedProps,
+ +threadInfo: ThreadInfo,
+};
type Props = {
- ...BaseProps,
+ ...SharedProps,
+ +threadInfo: ResolvedThreadInfo,
+colors: Colors,
+styles: typeof unboundStyles,
};
@@ -62,10 +67,19 @@
const ConnectedThreadListThread: React.ComponentType<BaseProps> = React.memo<BaseProps>(
function ConnectedThreadListThread(props: BaseProps) {
+ const { threadInfo, ...rest } = props;
const styles = useStyles(unboundStyles);
const colors = useColors();
+ const resolvedThreadInfo = useResolvedThreadInfo(threadInfo);
- return <ThreadListThread {...props} styles={styles} colors={colors} />;
+ return (
+ <ThreadListThread
+ {...rest}
+ threadInfo={resolvedThreadInfo}
+ styles={styles}
+ colors={colors}
+ />
+ );
},
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 3:29 AM (17 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2683471
Default Alt Text
D6601.id22014.diff (1 KB)
Attached To
Mode
D6601: [native] Fetch ENS names in ThreadListThread
Attached
Detach File
Event Timeline
Log In to Comment