Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3394122
D11693.id39242.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11693.id39242.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D11693: [native] Wait for authoritative keyserver login before setting avatar in registration flow
Attached
Detach File
Event Timeline
Log In to Comment