Page MenuHomePhabricator

D8023.diff
No OneTemporary

D8023.diff

diff --git a/native/avatars/edit-thread-avatar.react.js b/native/avatars/edit-thread-avatar.react.js
--- a/native/avatars/edit-thread-avatar.react.js
+++ b/native/avatars/edit-thread-avatar.react.js
@@ -39,11 +39,10 @@
navigate<'EmojiThreadAvatarCreation'>({
name: EmojiThreadAvatarCreationRouteName,
params: {
- threadID: threadInfo.id,
- containingThreadID: threadInfo.containingThreadID,
+ threadInfo,
},
});
- }, [navigate, threadInfo.containingThreadID, threadInfo.id]);
+ }, [navigate, threadInfo]);
const selectFromGallery = React.useCallback(
() => selectFromGalleryAndUpdateThreadAvatar(threadInfo.id),
diff --git a/native/chat/settings/emoji-thread-avatar-creation.react.js b/native/chat/settings/emoji-thread-avatar-creation.react.js
--- a/native/chat/settings/emoji-thread-avatar-creation.react.js
+++ b/native/chat/settings/emoji-thread-avatar-creation.react.js
@@ -4,6 +4,7 @@
import * as React from 'react';
import { savedEmojiAvatarSelectorForThread } from 'lib/selectors/thread-selectors.js';
+import type { RawThreadInfo, ThreadInfo } from 'lib/types/thread-types.js';
import { EditThreadAvatarContext } from '../../avatars/edit-thread-avatar-provider.react.js';
import EmojiAvatarCreation from '../../avatars/emoji-avatar-creation.react.js';
@@ -12,8 +13,7 @@
import type { NavigationRoute } from '../../navigation/route-names.js';
export type EmojiThreadAvatarCreationParams = {
- +threadID: string,
- +containingThreadID?: ?string,
+ +threadInfo: RawThreadInfo | ThreadInfo,
};
type Props = {
@@ -22,7 +22,7 @@
};
function EmojiThreadAvatarCreation(props: Props): React.Node {
- const { threadID, containingThreadID } = props.route.params;
+ const { id: threadID, containingThreadID } = props.route.params.threadInfo;
const selector = savedEmojiAvatarSelectorForThread(
threadID,
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
@@ -265,4 +265,5 @@
FullScreenThreadMediaGalleryRouteName,
MessageResultsScreenRouteName,
MessageSearchRouteName,
+ EmojiThreadAvatarCreationRouteName,
];

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 4, 11:12 PM (12 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2615095
Default Alt Text
D8023.diff (2 KB)

Event Timeline