Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3359174
D5555.id18214.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.id18214.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
Mon, Nov 25, 7:39 AM (21 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2578946
Default Alt Text
D5555.id18214.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