diff --git a/native/account/register-panel.react.js b/native/account/register-panel.react.js --- a/native/account/register-panel.react.js +++ b/native/account/register-panel.react.js @@ -12,7 +12,9 @@ Linking, } from 'react-native'; import Animated from 'react-native-reanimated'; +import { useDispatch } from 'react-redux'; +import { setDataLoadedActionType } from 'lib/actions/client-db-store-actions.js'; import { registerActionTypes, register } from 'lib/actions/user-actions.js'; import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js'; import { validUsernameRegex } from 'lib/shared/account-utils.js'; @@ -23,6 +25,7 @@ LogInStartingPayload, } from 'lib/types/account-types.js'; import type { LoadingStatus } from 'lib/types/loading-types.js'; +import type { Dispatch } from 'lib/types/redux-types.js'; import { useServerCall, useDispatchActionPromise, @@ -54,6 +57,7 @@ ...BaseProps, +loadingStatus: LoadingStatus, +logInExtraInfo: () => Promise, + +dispatch: Dispatch, +dispatchActionPromise: DispatchActionPromise, +register: (registerInfo: RegisterInfo) => Promise, +getInitialNotificationsEncryptedMessage: () => Promise, @@ -340,6 +344,12 @@ password: this.props.registerState.state.passwordInputText, }); this.props.setActiveAlert(false); + this.props.dispatch({ + type: setDataLoadedActionType, + payload: { + dataLoaded: true, + }, + }); await setNativeCredentials({ username: result.currentUserInfo.username, password: this.props.registerState.state.passwordInputText, @@ -462,6 +472,7 @@ }), ); + const dispatch = useDispatch(); const dispatchActionPromise = useDispatchActionPromise(); const callRegister = useServerCall(register); const getInitialNotificationsEncryptedMessage = @@ -472,6 +483,7 @@ {...props} loadingStatus={loadingStatus} logInExtraInfo={logInExtraInfo} + dispatch={dispatch} dispatchActionPromise={dispatchActionPromise} register={callRegister} getInitialNotificationsEncryptedMessage={