diff --git a/native/avatars/emoji-avatar-creation.react.js b/native/avatars/emoji-avatar-creation.react.js
--- a/native/avatars/emoji-avatar-creation.react.js
+++ b/native/avatars/emoji-avatar-creation.react.js
@@ -19,8 +19,6 @@
import Avatar from './avatar.react.js';
import Button from '../components/button.react.js';
import ColorRows from '../components/color-rows.react.js';
-import type { NavigationRoute } from '../navigation/route-names.js';
-import type { ProfileNavigationProp } from '../profile/profile.react.js';
import { useSelector } from '../redux/redux-utils.js';
import { useStyles } from '../themes/colors.js';
import {
@@ -43,12 +41,12 @@
};
type Props = {
- +navigation: ProfileNavigationProp<'EmojiAvatarCreation'>,
- +route: NavigationRoute<'EmojiAvatarCreation'>,
+ +threadID?: string,
+ +containingThreadID?: ?string,
};
function EmojiAvatarCreation(props: Props): React.Node {
- const { threadID, containingThreadID } = props.route.params;
+ const { threadID, containingThreadID } = props;
const selector = threadID
? savedEmojiAvatarSelectorForThread(threadID, containingThreadID)
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
@@ -41,11 +41,11 @@
import MessageListHeaderTitle from './message-list-header-title.react.js';
import MessageStorePruner from './message-store-pruner.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';
import ThreadScreenPruner from './thread-screen-pruner.react.js';
import ThreadSettingsButton from './thread-settings-button.react.js';
import ThreadSettingsHeaderTitle from './thread-settings-header-title.react.js';
-import EmojiAvatarCreation from '../avatars/emoji-avatar-creation.react.js';
import KeyboardAvoidingView from '../components/keyboard-avoiding-view.react.js';
import SWMansionIcon from '../components/swmansion-icon.react.js';
import { InputStateContext } from '../input/input-state.js';
@@ -57,7 +57,7 @@
ComposeSubchannelRouteName,
DeleteThreadRouteName,
ThreadSettingsRouteName,
- EmojiAvatarCreationRouteName,
+ EmojiThreadAvatarCreationRouteName,
FullScreenThreadMediaGalleryRouteName,
MessageListRouteName,
ChatThreadListRouteName,
@@ -360,8 +360,8 @@
options={threadSettingsOptions}
/>
,
- +route: NavigationRoute<'EmojiAvatarCreation'>,
+ +navigation: ChatNavigationProp<'EmojiThreadAvatarCreation'>,
+ +route: NavigationRoute<'EmojiThreadAvatarCreation'>,
};
-function EmojiAvatarCreation(props: Props): React.Node {
+function EmojiThreadAvatarCreation(props: Props): React.Node {
const { threadID, containingThreadID } = props.route.params;
const selector = threadID
@@ -253,4 +253,4 @@
},
};
-export default EmojiAvatarCreation;
+export default EmojiThreadAvatarCreation;
diff --git a/native/chat/settings/thread-settings-avatar.react.js b/native/chat/settings/thread-settings-avatar.react.js
--- a/native/chat/settings/thread-settings-avatar.react.js
+++ b/native/chat/settings/thread-settings-avatar.react.js
@@ -7,7 +7,7 @@
import { type ResolvedThreadInfo } from 'lib/types/thread-types.js';
import EditThreadAvatar from '../../avatars/edit-thread-avatar.react.js';
-import { EmojiAvatarCreationRouteName } from '../../navigation/route-names.js';
+import { EmojiThreadAvatarCreationRouteName } from '../../navigation/route-names.js';
import { useStyles } from '../../themes/colors.js';
type Props = {
@@ -22,8 +22,8 @@
const styles = useStyles(unboundStyles);
const onPressEmojiAvatarFlow = React.useCallback(() => {
- navigate<'EmojiAvatarCreation'>({
- name: EmojiAvatarCreationRouteName,
+ navigate<'EmojiThreadAvatarCreation'>({
+ name: EmojiThreadAvatarCreationRouteName,
params: {
threadID: threadInfo.id,
containingThreadID: threadInfo.containingThreadID,
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
@@ -4,7 +4,6 @@
import type { ActionResultModalParams } from './action-result-modal.react.js';
import type { TermsAndPrivacyModalParams } from '../account/terms-and-privacy-modal.react.js';
-import type { EmojiAvatarCreationParams } from '../avatars/emoji-avatar-creation.react.js';
import type { ThreadPickerModalParams } from '../calendar/thread-picker-modal.react.js';
import type { ComposeSubchannelParams } from '../chat/compose-subchannel.react.js';
import type { FullScreenThreadMediaGalleryParams } from '../chat/fullscreen-thread-media-gallery.react.js';
@@ -17,6 +16,7 @@
import type { ColorSelectorModalParams } from '../chat/settings/color-selector-modal.react.js';
import type { ComposeSubchannelModalParams } from '../chat/settings/compose-subchannel-modal.react.js';
import type { DeleteThreadParams } from '../chat/settings/delete-thread.react.js';
+import type { EmojiThreadAvatarCreationParams } from '../chat/settings/emoji-thread-avatar-creation.react.js';
import type { ThreadSettingsMemberTooltipModalParams } from '../chat/settings/thread-settings-member-tooltip-modal.react.js';
import type { ThreadSettingsParams } from '../chat/settings/thread-settings.react.js';
import type { SidebarListModalParams } from '../chat/sidebar-list-modal.react.js';
@@ -26,6 +26,7 @@
import type { ImageModalParams } from '../media/image-modal.react.js';
import type { VideoPlaybackModalParams } from '../media/video-playback-modal.react.js';
import type { CustomServerModalParams } from '../profile/custom-server-modal.react.js';
+import type { EmojiUserAvatarCreationParams } from '../profile/emoji-user-avatar-creation.react.js';
import type { RelationshipListItemTooltipModalParams } from '../profile/relationship-list-item-tooltip-modal.react.js';
export const ActionResultModalRouteName = 'ActionResultModal';
@@ -50,7 +51,8 @@
export const DeleteThreadRouteName = 'DeleteThread';
export const DevToolsRouteName = 'DevTools';
export const EditPasswordRouteName = 'EditPassword';
-export const EmojiAvatarCreationRouteName = 'EmojiAvatarCreation';
+export const EmojiThreadAvatarCreationRouteName = 'EmojiThreadAvatarCreation';
+export const EmojiUserAvatarCreationRouteName = 'EmojiUserAvatarCreation';
export const FriendListRouteName = 'FriendList';
export const FullScreenThreadMediaGalleryRouteName =
'FullScreenThreadMediaGallery';
@@ -129,7 +131,7 @@
+MessageList: MessageListParams,
+ComposeSubchannel: ComposeSubchannelParams,
+ThreadSettings: ThreadSettingsParams,
- +EmojiAvatarCreation: EmojiAvatarCreationParams,
+ +EmojiThreadAvatarCreation: EmojiThreadAvatarCreationParams,
+DeleteThread: DeleteThreadParams,
+FullScreenThreadMediaGallery: FullScreenThreadMediaGalleryParams,
};
@@ -141,7 +143,7 @@
export type ProfileParamList = {
+ProfileScreen: void,
- +EmojiAvatarCreation: EmojiAvatarCreationParams,
+ +EmojiUserAvatarCreation: EmojiUserAvatarCreationParams,
+EditPassword: void,
+DeleteAccount: void,
+BuildInfo: void,
diff --git a/native/avatars/emoji-avatar-creation.react.js b/native/profile/emoji-user-avatar-creation.react.js
copy from native/avatars/emoji-avatar-creation.react.js
copy to native/profile/emoji-user-avatar-creation.react.js
--- a/native/avatars/emoji-avatar-creation.react.js
+++ b/native/profile/emoji-user-avatar-creation.react.js
@@ -16,7 +16,7 @@
import { savedEmojiAvatarSelectorForCurrentUser } from 'lib/selectors/user-selectors.js';
import type { ClientEmojiAvatar } from 'lib/types/avatar-types.js';
-import Avatar from './avatar.react.js';
+import Avatar from '../avatars/avatar.react.js';
import Button from '../components/button.react.js';
import ColorRows from '../components/color-rows.react.js';
import type { NavigationRoute } from '../navigation/route-names.js';
@@ -37,17 +37,17 @@
`${changeThreadSettingsActionTypes.started}:avatar`,
);
-export type EmojiAvatarCreationParams = {
+export type EmojiUserAvatarCreationParams = {
+threadID?: string,
+containingThreadID?: ?string,
};
type Props = {
- +navigation: ProfileNavigationProp<'EmojiAvatarCreation'>,
- +route: NavigationRoute<'EmojiAvatarCreation'>,
+ +navigation: ProfileNavigationProp<'EmojiUserAvatarCreation'>,
+ +route: NavigationRoute<'EmojiUserAvatarCreation'>,
};
-function EmojiAvatarCreation(props: Props): React.Node {
+function EmojiUserAvatarCreation(props: Props): React.Node {
const { threadID, containingThreadID } = props.route.params;
const selector = threadID
@@ -253,4 +253,4 @@
},
};
-export default EmojiAvatarCreation;
+export default EmojiUserAvatarCreation;
diff --git a/native/profile/profile-screen.react.js b/native/profile/profile-screen.react.js
--- a/native/profile/profile-screen.react.js
+++ b/native/profile/profile-screen.react.js
@@ -27,7 +27,7 @@
import type { NavigationRoute } from '../navigation/route-names.js';
import {
EditPasswordRouteName,
- EmojiAvatarCreationRouteName,
+ EmojiUserAvatarCreationRouteName,
DeleteAccountRouteName,
BuildInfoRouteName,
DevToolsRouteName,
@@ -194,8 +194,8 @@
}
onPressEmojiAvatarFlow = () => {
- this.props.navigation.navigate<'EmojiAvatarCreation'>({
- name: EmojiAvatarCreationRouteName,
+ this.props.navigation.navigate<'EmojiUserAvatarCreation'>({
+ name: EmojiUserAvatarCreationRouteName,
params: {},
});
};
diff --git a/native/profile/profile.react.js b/native/profile/profile.react.js
--- a/native/profile/profile.react.js
+++ b/native/profile/profile.react.js
@@ -15,11 +15,11 @@
import DeleteAccount from './delete-account.react.js';
import DevTools from './dev-tools.react.js';
import EditPassword from './edit-password.react.js';
+import EmojiUserAvatarCreation from './emoji-user-avatar-creation.react.js';
import PrivacyPreferences from './privacy-preferences.react.js';
import ProfileHeader from './profile-header.react.js';
import ProfileScreen from './profile-screen.react.js';
import RelationshipList from './relationship-list.react.js';
-import EmojiAvatarCreation from '../avatars/emoji-avatar-creation.react.js';
import KeyboardAvoidingView from '../components/keyboard-avoiding-view.react.js';
import CommunityDrawerButton from '../navigation/community-drawer-button.react.js';
import type { CommunityDrawerNavigationProp } from '../navigation/community-drawer-navigator.react.js';
@@ -28,7 +28,7 @@
ProfileScreenRouteName,
EditPasswordRouteName,
DeleteAccountRouteName,
- EmojiAvatarCreationRouteName,
+ EmojiUserAvatarCreationRouteName,
BuildInfoRouteName,
DevToolsRouteName,
AppearancePreferencesRouteName,
@@ -115,8 +115,8 @@
options={profileScreenOptions}
/>