Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3520462
D8347.id29214.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D8347.id29214.diff
View Options
diff --git a/lib/components/base-edit-user-avatar-provider.react.js b/lib/components/base-edit-user-avatar-provider.react.js
--- a/lib/components/base-edit-user-avatar-provider.react.js
+++ b/lib/components/base-edit-user-avatar-provider.react.js
@@ -51,9 +51,6 @@
);
type Props = {
- +useUploadSelectedMedia: (
- setProcessingOrUploadInProgress?: (inProgress: boolean) => mixed,
- ) => (selection: NativeMediaSelection) => Promise<?ImageAvatarDBContent>,
+children: React.Node,
};
function BaseEditUserAvatarProvider(props: Props): React.Node {
diff --git a/native/avatars/native-edit-user-avatar-provider.react.js b/native/avatars/native-edit-user-avatar-provider.react.js
deleted file mode 100644
--- a/native/avatars/native-edit-user-avatar-provider.react.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// @flow
-
-import * as React from 'react';
-
-import { BaseEditUserAvatarProvider } from 'lib/components/base-edit-user-avatar-provider.react.js';
-
-import { useUploadSelectedMedia } from './avatar-hooks.js';
-
-type Props = {
- +children: React.Node,
-};
-function NativeEditUserAvatarProvider(props: Props): React.Node {
- const { children } = props;
- return (
- <BaseEditUserAvatarProvider useUploadSelectedMedia={useUploadSelectedMedia}>
- {children}
- </BaseEditUserAvatarProvider>
- );
-}
-
-export default NativeEditUserAvatarProvider;
diff --git a/native/root.react.js b/native/root.react.js
--- a/native/root.react.js
+++ b/native/root.react.js
@@ -18,13 +18,13 @@
import { Provider } from 'react-redux';
import { PersistGate as ReduxPersistGate } from 'redux-persist/es/integration/react.js';
+import { BaseEditUserAvatarProvider } from 'lib/components/base-edit-user-avatar-provider.react.js';
import { ENSCacheProvider } from 'lib/components/ens-cache-provider.react.js';
import { MediaCacheProvider } from 'lib/components/media-cache-provider.react.js';
import { actionLogger } from 'lib/utils/action-logger.js';
import { RegistrationContextProvider } from './account/registration/registration-context-provider.react.js';
import NativeEditThreadAvatarProvider from './avatars/native-edit-thread-avatar-provider.react.js';
-import NativeEditUserAvatarProvider from './avatars/native-edit-user-avatar-provider.react.js';
import ChatContextProvider from './chat/chat-context-provider.react.js';
import MessageEditingContextProvider from './chat/message-editing-context-provider.react.js';
import { FeatureFlagsProvider } from './components/feature-flags-provider.react.js';
@@ -269,7 +269,7 @@
<ActionSheetProvider>
<ENSCacheProvider provider={provider}>
<MediaCacheProvider persistence={filesystemMediaCache}>
- <NativeEditUserAvatarProvider>
+ <BaseEditUserAvatarProvider>
<NativeEditThreadAvatarProvider>
<MarkdownContextProvider>
<ChatContextProvider>
@@ -295,7 +295,7 @@
</ChatContextProvider>
</MarkdownContextProvider>
</NativeEditThreadAvatarProvider>
- </NativeEditUserAvatarProvider>
+ </BaseEditUserAvatarProvider>
</MediaCacheProvider>
</ENSCacheProvider>
</ActionSheetProvider>
diff --git a/web/app.react.js b/web/app.react.js
--- a/web/app.react.js
+++ b/web/app.react.js
@@ -15,6 +15,7 @@
fetchEntriesActionTypes,
updateCalendarQueryActionTypes,
} from 'lib/actions/entry-actions.js';
+import { BaseEditUserAvatarProvider } from 'lib/components/base-edit-user-avatar-provider.react.js';
import {
ModalProvider,
useModalContext,
@@ -31,7 +32,6 @@
import { infoFromURL } from 'lib/utils/url-utils.js';
import { WagmiENSCacheProvider, wagmiClient } from 'lib/utils/wagmi-utils.js';
-import WebEditUserAvatarProvider from './avatars/web-edit-user-avatar-provider.react.js';
import Calendar from './calendar/calendar.react.js';
import Chat from './chat/chat.react.js';
import { EditModalProvider } from './chat/edit-message-provider.js';
@@ -167,10 +167,10 @@
if (this.props.loggedIn) {
content = (
<>
- <WebEditUserAvatarProvider>
+ <BaseEditUserAvatarProvider>
{this.renderMainContent()}
{this.props.modals}
- </WebEditUserAvatarProvider>
+ </BaseEditUserAvatarProvider>
</>
);
} else {
diff --git a/web/avatars/web-edit-user-avatar-provider.react.js b/web/avatars/web-edit-user-avatar-provider.react.js
deleted file mode 100644
--- a/web/avatars/web-edit-user-avatar-provider.react.js
+++ /dev/null
@@ -1,22 +0,0 @@
-// @flow
-
-import * as React from 'react';
-
-import { BaseEditUserAvatarProvider } from 'lib/components/base-edit-user-avatar-provider.react.js';
-
-// TODO: Implement `useUploadSelectedMedia(...)` for `web`.
-const useUploadSelectedMedia = () => async () => null;
-
-type Props = {
- +children: React.Node,
-};
-function WebEditUserAvatarProvider(props: Props): React.Node {
- const { children } = props;
- return (
- <BaseEditUserAvatarProvider useUploadSelectedMedia={useUploadSelectedMedia}>
- {children}
- </BaseEditUserAvatarProvider>
- );
-}
-
-export default WebEditUserAvatarProvider;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 12:25 AM (19 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2697405
Default Alt Text
D8347.id29214.diff (5 KB)
Attached To
Mode
D8347: Consolidate `[Web/Native/Base]EditUserAvatarProvider` into `BaseEditUserAvatarProvider`
Attached
Detach File
Event Timeline
Log In to Comment