Page MenuHomePhabricator

D7509.diff
No OneTemporary

D7509.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
@@ -3,19 +3,22 @@
import * as React from 'react';
import { TouchableOpacity } from 'react-native';
+import type { RawThreadInfo, ThreadInfo } from 'lib/types/thread-types.js';
+
import {
useSelectAndUploadFromGallery,
useShowAvatarActionSheet,
} from './avatar-hooks.js';
import EditAvatarBadge from './edit-avatar-badge.react.js';
+import ThreadAvatar from './thread-avatar.react.js';
type Props = {
- +children: React.Node,
+ +threadInfo: RawThreadInfo | ThreadInfo,
+onPressEmojiAvatarFlow: () => mixed,
+disabled?: boolean,
};
function EditThreadAvatar(props: Props): React.Node {
- const { onPressEmojiAvatarFlow, children, disabled } = props;
+ const { threadInfo, onPressEmojiAvatarFlow, disabled } = props;
const selectAndUploadFromGallery = useSelectAndUploadFromGallery();
@@ -31,7 +34,7 @@
return (
<TouchableOpacity onPress={showAvatarActionSheet} disabled={disabled}>
- {children}
+ <ThreadAvatar threadInfo={threadInfo} size="profile" />
{!disabled ? <EditAvatarBadge /> : null}
</TouchableOpacity>
);
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,6 @@
import { type ResolvedThreadInfo } from 'lib/types/thread-types.js';
import EditThreadAvatar from '../../avatars/edit-thread-avatar.react.js';
-import ThreadAvatar from '../../avatars/thread-avatar.react.js';
import { EmojiAvatarCreationRouteName } from '../../navigation/route-names.js';
import { useStyles } from '../../themes/colors.js';
@@ -37,9 +36,8 @@
<EditThreadAvatar
onPressEmojiAvatarFlow={onPressEmojiAvatarFlow}
disabled={!canChangeSettings}
- >
- <ThreadAvatar size="profile" threadInfo={threadInfo} />
- </EditThreadAvatar>
+ threadInfo={threadInfo}
+ />
</View>
);
}

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 29, 7:09 PM (14 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2597863
Default Alt Text
D7509.diff (2 KB)

Event Timeline