Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3508792
D10983.id36810.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
10 KB
Referenced Files
None
Subscribers
None
D10983.id36810.diff
View Options
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}
/>
<Chat.Screen
- name={MessageResultsScreenRouteName}
- component={MessageResultsScreen}
- options={messageResultsScreenOptions}
+ name={PinnedMessagesScreenRouteName}
+ component={PinnedMessagesScreen}
+ options={pinnedMessagesScreenOptions}
/>
<Chat.Screen
name={MessageSearchRouteName}
diff --git a/native/chat/message-header.react.js b/native/chat/message-header.react.js
--- a/native/chat/message-header.react.js
+++ b/native/chat/message-header.react.js
@@ -63,7 +63,7 @@
// We only want to render the top-placed timestamp for a message if it's
// rendered in the message list, and not any separate screens (i.e.
- // the MessageResultsScreen).
+ // the PinnedMessagesScreen).
const presentedFromMessageList =
typeof route.params?.presentedFrom === 'string' &&
route.params.presentedFrom.startsWith(MessageListRouteName);
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
@@ -40,7 +40,7 @@
} from '../navigation/overlay-context.js';
import type { NavigationRoute } from '../navigation/route-names.js';
import {
- MessageResultsScreenRouteName,
+ PinnedMessagesScreenRouteName,
ThreadSettingsRouteName,
} from '../navigation/route-names.js';
import { useSelector } from '../redux/redux-utils.js';
@@ -367,12 +367,12 @@
pinnedMessageCountText(threadInfo.pinnedCount);
const navigateToMessageResults = React.useCallback(() => {
- 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,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 11:56 PM (20 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2689735
Default Alt Text
D10983.id36810.diff (10 KB)
Attached To
Mode
D10983: [native] rename MessageResultsScreen to PinnedMessagesScreen
Attached
Detach File
Event Timeline
Log In to Comment