Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3380246
D5555.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
D5555.diff
View Options
diff --git a/native/data/sqlite-context-provider.js b/native/data/sqlite-context-provider.js
--- a/native/data/sqlite-context-provider.js
+++ b/native/data/sqlite-context-provider.js
@@ -7,6 +7,7 @@
import { setMessageStoreMessages } from 'lib/actions/message-actions.js';
import { setThreadStoreActionType } from 'lib/actions/thread-actions';
+import { isLoggedIn } from 'lib/selectors/user-selectors';
import { logInActionSources } from 'lib/types/account-types';
import { fetchNewCookieFromNativeCredentials } from 'lib/utils/action-utils';
import { getMessageForException } from 'lib/utils/errors';
@@ -31,11 +32,16 @@
const cookie = useSelector(state => state.cookie);
const urlPrefix = useSelector(state => state.urlPrefix);
const staffCanSee = useStaffCanSee();
+ const loggedIn = useSelector(isLoggedIn);
React.useEffect(() => {
if (storeLoaded || !rehydrateConcluded) {
return;
}
+ if (!loggedIn) {
+ setStoreLoaded(true);
+ return;
+ }
(async () => {
try {
const [threads, messages] = await Promise.all([
@@ -86,6 +92,7 @@
}
})();
}, [
+ loggedIn,
cookie,
dispatch,
rehydrateConcluded,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 28, 10:26 PM (20 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2595027
Default Alt Text
D5555.diff (1 KB)
Attached To
Mode
D5555: Ensure SQLiteContextProvider doesn't query SQLite and modify redux if user is logged out.
Attached
Detach File
Event Timeline
Log In to Comment