diff --git a/native/chat/chat.react.js b/native/chat/chat.react.js
--- a/native/chat/chat.react.js
+++ b/native/chat/chat.react.js
@@ -44,8 +44,8 @@
import { MessageEditingContext } from './message-editing-context.react.js';
import MessageListContainer from './message-list-container.react.js';
import MessageListHeaderTitle from './message-list-header-title.react.js';
-import MessageResultsScreen from './message-results-screen.react.js';
import MessageStorePruner from './message-store-pruner.react.js';
+import PinnedMessagesScreen from './pinned-messages-screen.react.js';
import DeleteThread from './settings/delete-thread.react.js';
import EmojiThreadAvatarCreation from './settings/emoji-thread-avatar-creation.react.js';
import ThreadSettings from './settings/thread-settings.react.js';
@@ -64,7 +64,7 @@
ThreadSettingsRouteName,
EmojiThreadAvatarCreationRouteName,
FullScreenThreadMediaGalleryRouteName,
- MessageResultsScreenRouteName,
+ PinnedMessagesScreenRouteName,
MessageListRouteName,
ChatThreadListRouteName,
HomeChatThreadListRouteName,
@@ -315,7 +315,7 @@
width: '100%',
},
};
-const messageResultsScreenOptions = {
+const pinnedMessagesScreenOptions = {
headerTitle: 'Pinned Messages',
headerBackTitleVisible: false,
};
@@ -449,9 +449,9 @@
options={deleteThreadOptions}
/>
{
- props.navigation.navigate<'MessageResultsScreen'>({
- name: MessageResultsScreenRouteName,
+ props.navigation.navigate<'PinnedMessagesScreen'>({
+ name: PinnedMessagesScreenRouteName,
params: {
threadInfo,
},
- key: `MessageResultsScreen${threadInfo.id}`,
+ key: `PinnedMessagesScreen${threadInfo.id}`,
});
}, [props.navigation, threadInfo]);
diff --git a/native/chat/message-result.react.js b/native/chat/message-result.react.js
--- a/native/chat/message-result.react.js
+++ b/native/chat/message-result.react.js
@@ -22,11 +22,11 @@
+threadInfo: ThreadInfo,
+navigation:
| AppNavigationProp<'TogglePinModal'>
- | ChatNavigationProp<'MessageResultsScreen'>
+ | ChatNavigationProp<'PinnedMessagesScreen'>
| ChatNavigationProp<'MessageSearch'>,
+route:
| NavigationRoute<'TogglePinModal'>
- | NavigationRoute<'MessageResultsScreen'>
+ | NavigationRoute<'PinnedMessagesScreen'>
| NavigationRoute<'MessageSearch'>,
+messageVerticalBounds: ?VerticalBounds,
+scrollable: boolean,
diff --git a/native/chat/message.react.js b/native/chat/message.react.js
--- a/native/chat/message.react.js
+++ b/native/chat/message.react.js
@@ -28,12 +28,12 @@
+navigation:
| ChatNavigationProp<'MessageList'>
| AppNavigationProp<'TogglePinModal'>
- | ChatNavigationProp<'MessageResultsScreen'>
+ | ChatNavigationProp<'PinnedMessagesScreen'>
| ChatNavigationProp<'MessageSearch'>,
+route:
| NavigationRoute<'MessageList'>
| NavigationRoute<'TogglePinModal'>
- | NavigationRoute<'MessageResultsScreen'>
+ | NavigationRoute<'PinnedMessagesScreen'>
| NavigationRoute<'MessageSearch'>,
+toggleFocus: (messageKey: string) => void,
+verticalBounds: ?VerticalBounds,
diff --git a/native/chat/message-results-screen.react.js b/native/chat/pinned-messages-screen.react.js
rename from native/chat/message-results-screen.react.js
rename to native/chat/pinned-messages-screen.react.js
--- a/native/chat/message-results-screen.react.js
+++ b/native/chat/pinned-messages-screen.react.js
@@ -27,16 +27,16 @@
import type { ChatMessageItemWithHeight } from '../types/chat-types.js';
import type { VerticalBounds } from '../types/layout-types.js';
-export type MessageResultsScreenParams = {
+export type PinnedMessagesScreenParams = {
+threadInfo: ThreadInfo,
};
-type MessageResultsScreenProps = {
- +navigation: ChatNavigationProp<'MessageResultsScreen'>,
- +route: NavigationRoute<'MessageResultsScreen'>,
+type Props = {
+ +navigation: ChatNavigationProp<'PinnedMessagesScreen'>,
+ +route: NavigationRoute<'PinnedMessagesScreen'>,
};
-function MessageResultsScreen(props: MessageResultsScreenProps): React.Node {
+function PinnedMessagesScreen(props: Props): React.Node {
const { navigation, route } = props;
const { threadInfo } = route.params;
const styles = useStyles(unboundStyles);
@@ -192,4 +192,4 @@
},
};
-export default MessageResultsScreen;
+export default PinnedMessagesScreen;
diff --git a/native/chat/robotext-message.react.js b/native/chat/robotext-message.react.js
--- a/native/chat/robotext-message.react.js
+++ b/native/chat/robotext-message.react.js
@@ -31,12 +31,12 @@
+navigation:
| ChatNavigationProp<'MessageList'>
| AppNavigationProp<'TogglePinModal'>
- | ChatNavigationProp<'MessageResultsScreen'>
+ | ChatNavigationProp<'PinnedMessagesScreen'>
| ChatNavigationProp<'MessageSearch'>,
+route:
| NavigationRoute<'MessageList'>
| NavigationRoute<'TogglePinModal'>
- | NavigationRoute<'MessageResultsScreen'>
+ | NavigationRoute<'PinnedMessagesScreen'>
| NavigationRoute<'MessageSearch'>,
+focused: boolean,
+toggleFocus: (messageKey: string) => void,
diff --git a/native/chat/text-message.react.js b/native/chat/text-message.react.js
--- a/native/chat/text-message.react.js
+++ b/native/chat/text-message.react.js
@@ -41,12 +41,12 @@
+navigation:
| ChatNavigationProp<'MessageList'>
| AppNavigationProp<'TogglePinModal'>
- | ChatNavigationProp<'MessageResultsScreen'>
+ | ChatNavigationProp<'PinnedMessagesScreen'>
| ChatNavigationProp<'MessageSearch'>,
+route:
| NavigationRoute<'MessageList'>
| NavigationRoute<'TogglePinModal'>
- | NavigationRoute<'MessageResultsScreen'>
+ | NavigationRoute<'PinnedMessagesScreen'>
| NavigationRoute<'MessageSearch'>,
+focused: boolean,
+toggleFocus: (messageKey: string) => void,
diff --git a/native/navigation/nav-selectors.js b/native/navigation/nav-selectors.js
--- a/native/navigation/nav-selectors.js
+++ b/native/navigation/nav-selectors.js
@@ -34,7 +34,7 @@
ChatRouteName,
CommunityDrawerNavigatorRouteName,
MessageListRouteName,
- MessageResultsScreenRouteName,
+ PinnedMessagesScreenRouteName,
MessageSearchRouteName,
scrollBlockingModals,
TabNavigatorRouteName,
@@ -414,7 +414,7 @@
const canEditInThisScreen =
!screenKey.startsWith(MessageSearchRouteName) &&
- !screenKey.startsWith(MessageResultsScreenRouteName) &&
+ !screenKey.startsWith(PinnedMessagesScreenRouteName) &&
messageCreationTime >= threadCreationTime;
return (
diff --git a/native/navigation/route-names.js b/native/navigation/route-names.js
--- a/native/navigation/route-names.js
+++ b/native/navigation/route-names.js
@@ -19,8 +19,8 @@
import type { ImagePasteModalParams } from '../chat/image-paste-modal.react.js';
import type { MessageListParams } from '../chat/message-list-types.js';
import type { MessageReactionsModalParams } from '../chat/message-reactions-modal.react.js';
-import type { MessageResultsScreenParams } from '../chat/message-results-screen.react.js';
import type { MultimediaMessageTooltipModalParams } from '../chat/multimedia-message-tooltip-modal.react.js';
+import type { PinnedMessagesScreenParams } from '../chat/pinned-messages-screen.react.js';
import type { RobotextMessageTooltipModalParams } from '../chat/robotext-message-tooltip-modal.react.js';
import type { AddUsersModalParams } from '../chat/settings/add-users-modal.react.js';
import type { ColorSelectorModalParams } from '../chat/settings/color-selector-modal.react.js';
@@ -89,7 +89,7 @@
export const ManagePublicLinkRouteName = 'ManagePublicLink';
export const MessageListRouteName = 'MessageList';
export const MessageReactionsModalRouteName = 'MessageReactionsModal';
-export const MessageResultsScreenRouteName = 'MessageResultsScreen';
+export const PinnedMessagesScreenRouteName = 'PinnedMessagesScreen';
export const MultimediaMessageTooltipModalRouteName =
'MultimediaMessageTooltipModal';
export const PrivacyPreferencesRouteName = 'PrivacyPreferences';
@@ -216,7 +216,7 @@
+EmojiThreadAvatarCreation: EmojiThreadAvatarCreationParams,
+DeleteThread: DeleteThreadParams,
+FullScreenThreadMediaGallery: FullScreenThreadMediaGalleryParams,
- +MessageResultsScreen: MessageResultsScreenParams,
+ +PinnedMessagesScreen: PinnedMessagesScreenParams,
+MessageSearch: MessageSearchParams,
+ChangeRolesScreen: ChangeRolesScreenParams,
};
@@ -334,7 +334,7 @@
DeleteThreadRouteName,
ComposeSubchannelRouteName,
FullScreenThreadMediaGalleryRouteName,
- MessageResultsScreenRouteName,
+ PinnedMessagesScreenRouteName,
MessageSearchRouteName,
EmojiThreadAvatarCreationRouteName,
CommunityRolesScreenRouteName,