Page MenuHomePhabricator

D8800.diff
No OneTemporary

D8800.diff

diff --git a/web/app.react.js b/web/app.react.js
--- a/web/app.react.js
+++ b/web/app.react.js
@@ -32,6 +32,7 @@
import { infoFromURL } from 'lib/utils/url-utils.js';
import { WagmiENSCacheProvider, wagmiClient } from 'lib/utils/wagmi-utils.js';
+import WebEditThreadAvatarProvider from './avatars/native-edit-thread-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 +168,12 @@
if (this.props.loggedIn) {
content = (
<>
- <EditUserAvatarProvider>
- {this.renderMainContent()}
- {this.props.modals}
- </EditUserAvatarProvider>
+ <WebEditThreadAvatarProvider>
+ <EditUserAvatarProvider>
+ {this.renderMainContent()}
+ {this.props.modals}
+ </EditUserAvatarProvider>
+ </WebEditThreadAvatarProvider>
</>
);
} else {
diff --git a/web/avatars/native-edit-thread-avatar-provider.react.js b/web/avatars/native-edit-thread-avatar-provider.react.js
new file mode 100644
--- /dev/null
+++ b/web/avatars/native-edit-thread-avatar-provider.react.js
@@ -0,0 +1,25 @@
+// @flow
+
+import * as React from 'react';
+
+import { BaseEditThreadAvatarProvider } from 'lib/components/base-edit-thread-avatar-provider.react.js';
+
+import { useSelector } from '../redux/redux-utils.js';
+import { activeChatThreadItem as activeChatThreadItemSelector } from '../selectors/chat-selectors.js';
+
+type Props = {
+ +children: React.Node,
+};
+function WebEditThreadAvatarProvider(props: Props): React.Node {
+ const { children } = props;
+ const activeChatThreadItem = useSelector(activeChatThreadItemSelector);
+ const activeThreadID = activeChatThreadItem?.threadInfo?.id ?? '';
+
+ return (
+ <BaseEditThreadAvatarProvider activeThreadID={activeThreadID}>
+ {children}
+ </BaseEditThreadAvatarProvider>
+ );
+}
+
+export default WebEditThreadAvatarProvider;

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 5:52 AM (21 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2515436
Default Alt Text
D8800.diff (2 KB)

Event Timeline