Page MenuHomePhabricator

D8221.diff
No OneTemporary

D8221.diff

diff --git a/native/avatars/edit-thread-avatar-provider.react.js b/lib/components/base-edit-thread-avatar-provider.react.js
rename from native/avatars/edit-thread-avatar-provider.react.js
rename to lib/components/base-edit-thread-avatar-provider.react.js
--- a/native/avatars/edit-thread-avatar-provider.react.js
+++ b/lib/components/base-edit-thread-avatar-provider.react.js
@@ -5,24 +5,23 @@
import {
changeThreadSettings,
changeThreadSettingsActionTypes,
-} from 'lib/actions/thread-actions.js';
-import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
+} from '../actions/thread-actions.js';
+import { createLoadingStatusSelector } from '../selectors/loading-selectors.js';
import type {
UpdateUserAvatarRequest,
ImageAvatarDBContent,
-} from 'lib/types/avatar-types.js';
-import type { LoadingStatus } from 'lib/types/loading-types.js';
+} from '../types/avatar-types.js';
+import type { LoadingStatus } from '../types/loading-types.js';
import type {
MediaLibrarySelection,
NativeMediaSelection,
-} from 'lib/types/media-types.js';
-import type { UpdateThreadRequest } from 'lib/types/thread-types.js';
+} from '../types/media-types.js';
+import type { UpdateThreadRequest } from '../types/thread-types.js';
import {
useDispatchActionPromise,
useServerCall,
-} from 'lib/utils/action-utils.js';
-
-import { useSelector } from '../redux/redux-utils.js';
+} from '../utils/action-utils.js';
+import { useSelector } from '../utils/redux-utils.js';
export type EditThreadAvatarContextType = {
+threadAvatarSaveInProgress: boolean,
@@ -49,7 +48,7 @@
+activeThreadID: string,
+children: React.Node,
};
-function EditThreadAvatarProvider(props: Props): React.Node {
+function BaseEditThreadAvatarProvider(props: Props): React.Node {
const {
displayFailureAlert,
selectFromGallery,
@@ -194,4 +193,4 @@
);
}
-export { EditThreadAvatarContext, EditThreadAvatarProvider };
+export { EditThreadAvatarContext, BaseEditThreadAvatarProvider };
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
@@ -5,11 +5,11 @@
import * as React from 'react';
import { ActivityIndicator, TouchableOpacity, View } from 'react-native';
+import { EditThreadAvatarContext } from 'lib/components/base-edit-thread-avatar-provider.react.js';
import type { RawThreadInfo, ThreadInfo } from 'lib/types/thread-types.js';
import { useShowAvatarActionSheet } from './avatar-hooks.js';
import EditAvatarBadge from './edit-avatar-badge.react.js';
-import { EditThreadAvatarContext } from './edit-thread-avatar-provider.react.js';
import ThreadAvatar from './thread-avatar.react.js';
import {
EmojiThreadAvatarCreationRouteName,
diff --git a/native/avatars/native-edit-thread-avatar-provider.react.js b/native/avatars/native-edit-thread-avatar-provider.react.js
--- a/native/avatars/native-edit-thread-avatar-provider.react.js
+++ b/native/avatars/native-edit-thread-avatar-provider.react.js
@@ -3,8 +3,9 @@
import * as React from 'react';
import { Alert } from 'react-native';
+import { BaseEditThreadAvatarProvider } from 'lib/components/base-edit-thread-avatar-provider.react.js';
+
import { selectFromGallery, useUploadSelectedMedia } from './avatar-hooks.js';
-import { EditThreadAvatarProvider } from './edit-thread-avatar-provider.react.js';
import { activeThreadSelector } from '../navigation/nav-selectors.js';
import { NavContext } from '../navigation/navigation-context.js';
@@ -29,14 +30,14 @@
);
return (
- <EditThreadAvatarProvider
+ <BaseEditThreadAvatarProvider
displayFailureAlert={displayAvatarUpdateFailureAlert}
selectFromGallery={selectFromGallery}
useUploadSelectedMedia={useUploadSelectedMedia}
activeThreadID={activeThreadID}
>
{children}
- </EditThreadAvatarProvider>
+ </BaseEditThreadAvatarProvider>
);
}
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
@@ -3,10 +3,10 @@
import invariant from 'invariant';
import * as React from 'react';
+import { EditThreadAvatarContext } from 'lib/components/base-edit-thread-avatar-provider.react.js';
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';
import type { ChatNavigationProp } from '../../chat/chat.react.js';
import { displayActionResultModal } from '../../navigation/action-result-modal.js';
diff --git a/native/media/thread-avatar-camera-modal.react.js b/native/media/thread-avatar-camera-modal.react.js
--- a/native/media/thread-avatar-camera-modal.react.js
+++ b/native/media/thread-avatar-camera-modal.react.js
@@ -3,9 +3,9 @@
import invariant from 'invariant';
import * as React from 'react';
+import { EditThreadAvatarContext } from 'lib/components/base-edit-thread-avatar-provider.react.js';
import type { PhotoCapture } from 'lib/types/media-types.js';
-import { EditThreadAvatarContext } from '../avatars/edit-thread-avatar-provider.react.js';
import CameraModal from '../media/camera-modal.react.js';
import type { AppNavigationProp } from '../navigation/app-navigator.react.js';
import type { NavigationRoute } from '../navigation/route-names.js';

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 1:58 PM (19 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2687918
Default Alt Text
D8221.diff (5 KB)

Event Timeline