Created
September 20, 2024 08:21
-
-
Save vdhanan/df461cabc7a954ab1bc169104b98fbbb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
varun@varuns-MacBook-Pro web % git diff | |
diff --git a/web/settings/password-change-modal.js b/web/settings/password-change-modal.js | |
index 59a041416a..f534c474e6 100644 | |
--- a/web/settings/password-change-modal.js | |
+++ b/web/settings/password-change-modal.js | |
@@ -3,6 +3,10 @@ | |
import invariant from 'invariant'; | |
import * as React from 'react'; | |
+import { | |
+ fetchAllCommunityInfosWithNames, | |
+ fetchAllCommunityInfosWithNamesActionTypes, | |
+} from 'lib/actions/community-actions.js'; | |
import { | |
changeKeyserverUserPasswordActionTypes, | |
changeKeyserverUserPassword, | |
@@ -13,6 +17,7 @@ import { useModalContext } from 'lib/components/modal-provider.react.js'; | |
import { useStringForUser } from 'lib/hooks/ens-cache.js'; | |
import { useLegacyAshoatKeyserverCall } from 'lib/keyserver-conn/legacy-keyserver-call.js'; | |
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js'; | |
+import type { FetchAllCommunityInfosWithNamesResponse } from 'lib/types/community-types.js'; | |
import { type PasswordUpdate } from 'lib/types/user-types.js'; | |
import { getMessageForException } from 'lib/utils/errors.js'; | |
import { | |
@@ -37,6 +42,7 @@ type Props = { | |
oldPassword: string, | |
newPassword: string, | |
) => Promise<void>, | |
+ +fetchAllCommunities: () => Promise<FetchAllCommunityInfosWithNamesResponse>, | |
+popModal: () => void, | |
+stringForUser: ?string, | |
}; | |
@@ -194,6 +200,11 @@ class PasswordChangeModal extends React.PureComponent<Props, State> { | |
return; | |
} | |
+ void this.props.dispatchActionPromise( | |
+ fetchAllCommunityInfosWithNamesActionTypes, | |
+ this.props.fetchAllCommunities(), | |
+ ); | |
+ | |
if (usingCommServicesAccessToken) { | |
void this.props.dispatchActionPromise( | |
changeIdentityUserPasswordActionTypes, | |
@@ -272,6 +283,9 @@ const ConnectedPasswordChangeModal: React.ComponentType<{}> = React.memo<{}>( | |
const callChangeKeyserverUserPassword = useLegacyAshoatKeyserverCall( | |
changeKeyserverUserPassword, | |
); | |
+ const callFetchAllCommunities = useLegacyAshoatKeyserverCall( | |
+ fetchAllCommunityInfosWithNames, | |
+ ); | |
const callChangeIdentityUserPassword = useChangeIdentityUserPassword(); | |
const dispatchActionPromise = useDispatchActionPromise(); | |
@@ -285,6 +299,7 @@ const ConnectedPasswordChangeModal: React.ComponentType<{}> = React.memo<{}>( | |
inputDisabled={inputDisabled} | |
changeKeyserverUserPassword={callChangeKeyserverUserPassword} | |
changeIdentityUserPassword={callChangeIdentityUserPassword} | |
+ fetchAllCommunities={callFetchAllCommunities} | |
dispatchActionPromise={dispatchActionPromise} | |
popModal={modalContext.popModal} | |
stringForUser={stringForUser} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment