Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3517449
D13275.id44035.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
D13275.id44035.diff
View Options
diff --git a/native/chat/message-list-container.react.js b/native/chat/message-list-container.react.js
--- a/native/chat/message-list-container.react.js
+++ b/native/chat/message-list-container.react.js
@@ -18,6 +18,7 @@
useExistingThreadInfoFinder,
} from 'lib/shared/thread-utils.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
+import { threadTypeIsThick } from 'lib/types/thread-types-enum.js';
import type { AccountUserInfo, UserListItem } from 'lib/types/user-types.js';
import { pinnedMessageCountText } from 'lib/utils/message-pinning-utils.js';
@@ -160,10 +161,23 @@
let searchComponent = null;
if (searching) {
const { userInfoInputArray, genesisThreadInfo } = this.props;
+ const childThreadType = pendingThreadType(
+ userInfoInputArray.length,
+ true,
+ );
// It's technically possible for the client to be missing the Genesis
// ThreadInfo when it first opens up (before the server delivers it)
let parentThreadHeader;
- if (genesisThreadInfo) {
+ if (threadTypeIsThick(childThreadType)) {
+ parentThreadHeader = (
+ <ParentThreadHeader
+ childThreadType={pendingThreadType(
+ userInfoInputArray.length,
+ false,
+ )}
+ />
+ );
+ } else if (genesisThreadInfo) {
parentThreadHeader = (
<ParentThreadHeader
parentThreadInfo={genesisThreadInfo}
diff --git a/native/chat/parent-thread-header.react.js b/native/chat/parent-thread-header.react.js
--- a/native/chat/parent-thread-header.react.js
+++ b/native/chat/parent-thread-header.react.js
@@ -14,7 +14,7 @@
import { useColors, useStyles } from '../themes/colors.js';
type Props = {
- +parentThreadInfo: ThreadInfo,
+ +parentThreadInfo?: ThreadInfo,
+childThreadType: ThreadType,
};
function ParentThreadHeader(props: Props): React.Node {
@@ -26,9 +26,24 @@
const navigateToThread = useNavigateToThread();
const onPressParentThread = React.useCallback(() => {
+ if (!parentThreadInfo) {
+ return;
+ }
navigateToThread({ threadInfo: parentThreadInfo });
}, [parentThreadInfo, navigateToThread]);
+ let parentThreadButton;
+ if (parentThreadInfo) {
+ parentThreadButton = (
+ <>
+ <Text style={styles.within}>within</Text>
+ <Button onPress={onPressParentThread}>
+ <CommunityPill community={parentThreadInfo} />
+ </Button>
+ </>
+ );
+ }
+
return (
<View style={styles.container}>
<ScrollView
@@ -40,10 +55,7 @@
threadType={childThreadType}
color={threadVisibilityColor}
/>
- <Text style={styles.within}>within</Text>
- <Button onPress={onPressParentThread}>
- <CommunityPill community={parentThreadInfo} />
- </Button>
+ {parentThreadButton}
</ScrollView>
</View>
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 5:31 PM (18 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2695531
Default Alt Text
D13275.id44035.diff (2 KB)
Attached To
Mode
D13275: Update search header in chat creation on native not to show GENESIS for thick threads
Attached
Detach File
Event Timeline
Log In to Comment