Page MenuHomePhabricator

D6432.diff
No OneTemporary

D6432.diff

diff --git a/native/chat/settings/thread-settings-edit-relationship.react.js b/native/chat/settings/thread-settings-edit-relationship.react.js
--- a/native/chat/settings/thread-settings-edit-relationship.react.js
+++ b/native/chat/settings/thread-settings-edit-relationship.react.js
@@ -8,6 +8,7 @@
updateRelationships as serverUpdateRelationships,
updateRelationshipsActionTypes,
} from 'lib/actions/relationship-actions';
+import { useENSNames } from 'lib/hooks/ens-cache';
import {
getRelationshipActionText,
getRelationshipDispatchAction,
@@ -36,7 +37,7 @@
const ThreadSettingsEditRelationship: React.ComponentType<Props> = React.memo<Props>(
function ThreadSettingsEditRelationship(props: Props) {
- const otherUserInfo = useSelector(state => {
+ const otherUserInfoFromRedux = useSelector(state => {
const currentUserID = state.currentUserInfo?.id;
const otherUserID = getSingleOtherUser(props.threadInfo, currentUserID);
invariant(otherUserID, 'Other user should be specified');
@@ -44,7 +45,9 @@
const { userInfos } = state.userStore;
return userInfos[otherUserID];
});
- invariant(otherUserInfo, 'Other user info should be specified');
+ invariant(otherUserInfoFromRedux, 'Other user info should be specified');
+
+ const [otherUserInfo] = useENSNames([otherUserInfoFromRedux]);
const callUpdateRelationships = useServerCall(serverUpdateRelationships);
const updateRelationship = React.useCallback(
diff --git a/native/chat/settings/thread-settings-member.react.js b/native/chat/settings/thread-settings-member.react.js
--- a/native/chat/settings/thread-settings-member.react.js
+++ b/native/chat/settings/thread-settings-member.react.js
@@ -14,6 +14,7 @@
removeUsersFromThreadActionTypes,
changeThreadMemberRolesActionTypes,
} from 'lib/actions/thread-actions';
+import { useENSNames } from 'lib/hooks/ens-cache';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors';
import {
memberIsAdmin,
@@ -264,6 +265,8 @@
)(state),
);
+ const [memberInfo] = useENSNames([props.memberInfo]);
+
const colors = useColors();
const styles = useStyles(unboundStyles);
const keyboardState = React.useContext(KeyboardContext);
@@ -271,6 +274,7 @@
return (
<ThreadSettingsMember
{...props}
+ memberInfo={memberInfo}
removeUserLoadingStatus={removeUserLoadingStatus}
changeRoleLoadingStatus={changeRoleLoadingStatus}
colors={colors}

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 9:54 AM (21 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2676657
Default Alt Text
D6432.diff (2 KB)

Event Timeline