Page MenuHomePhabricator

D11693.id39242.diff
No OneTemporary

D11693.id39242.diff

diff --git a/native/account/registration/registration-server-call.js b/native/account/registration/registration-server-call.js
--- a/native/account/registration/registration-server-call.js
+++ b/native/account/registration/registration-server-call.js
@@ -10,6 +10,7 @@
useIdentityPasswordRegister,
identityRegisterActionTypes,
} from 'lib/actions/user-actions.js';
+import { isLoggedInToKeyserver } from 'lib/selectors/user-selectors.js';
import type { LogInStartingPayload } from 'lib/types/account-types.js';
import { syncedMetadataNames } from 'lib/types/synced-metadata-types.js';
import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
@@ -23,6 +24,7 @@
UsernameAccountSelection,
AvatarData,
} from './registration-types.js';
+import { authoritativeKeyserverID } from '../../authoritative-keyserver.js';
import {
useNativeSetUserAvatar,
useUploadSelectedMedia,
@@ -279,14 +281,14 @@
const uploadSelectedMedia = useUploadSelectedMedia();
const nativeSetUserAvatar = useNativeSetUserAvatar();
- const hasCurrentUserInfo = useSelector(
- state => !!state.currentUserInfo && !state.currentUserInfo.anonymous,
+ const isLoggedInToAuthoritativeKeyserver = useSelector(
+ isLoggedInToKeyserver(authoritativeKeyserverID),
);
const avatarBeingSetRef = React.useRef(false);
React.useEffect(() => {
if (
- !hasCurrentUserInfo ||
+ !isLoggedInToAuthoritativeKeyserver ||
currentStep.step !== 'waiting_for_registration_call' ||
avatarBeingSetRef.current
) {
@@ -324,7 +326,7 @@
})();
}, [
currentStep,
- hasCurrentUserInfo,
+ isLoggedInToAuthoritativeKeyserver,
uploadSelectedMedia,
nativeSetUserAvatar,
dispatch,

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 1, 5:39 PM (21 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2605708
Default Alt Text
D11693.id39242.diff (1 KB)

Event Timeline