Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3408202
D8023.id27243.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
D8023.id27243.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 5, 10:21 AM (16 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2615095
Default Alt Text
D8023.id27243.diff (2 KB)
Attached To
Mode
D8023: [native] Make EmojiThreadAvatarCreation work with activeThreadSelector
Attached
Detach File
Event Timeline
Log In to Comment