Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32103478
D14917.1765013198.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D14917.1765013198.diff
View Options
diff --git a/native/navigation/navigation-handler.react.js b/native/navigation/navigation-handler.react.js
--- a/native/navigation/navigation-handler.react.js
+++ b/native/navigation/navigation-handler.react.js
@@ -3,6 +3,7 @@
import * as React from 'react';
import { useIsLoggedInToIdentityAndAuthoritativeKeyserver } from 'lib/hooks/account-hooks.js';
+import { useIsUserDataReady } from 'lib/hooks/backup-hooks.js';
import { usePersistedStateLoaded } from 'lib/selectors/app-state-selectors.js';
import { logInActionType, logOutActionType } from './action-types.js';
@@ -59,21 +60,23 @@
const { dispatch } = props;
const loggedIn = useIsLoggedInToIdentityAndAuthoritativeKeyserver();
+ const userDataReady = useIsUserDataReady();
+ const appLoggedIn = loggedIn && userDataReady;
const navLoggedIn = useIsAppLoggedIn();
const prevLoggedInRef = React.useRef<?boolean>();
React.useEffect(() => {
- if (loggedIn === prevLoggedInRef.current) {
+ if (appLoggedIn === prevLoggedInRef.current) {
return;
}
- prevLoggedInRef.current = loggedIn;
- if (loggedIn && !navLoggedIn) {
+ prevLoggedInRef.current = appLoggedIn;
+ if (appLoggedIn && !navLoggedIn) {
dispatch({ type: (logInActionType: 'LOG_IN') });
- } else if (!loggedIn && navLoggedIn) {
+ } else if (!appLoggedIn && navLoggedIn) {
dispatch({ type: (logOutActionType: 'LOG_OUT') });
}
- }, [navLoggedIn, loggedIn, dispatch]);
+ }, [navLoggedIn, appLoggedIn, dispatch]);
return null;
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 6, 9:26 AM (6 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5835844
Default Alt Text
D14917.1765013198.diff (1 KB)
Attached To
Mode
D14917: [native] Keep LoggedOutModal until restoration finishes
Attached
Detach File
Event Timeline
Log In to Comment