Page MenuHomePhabricator

D5555.id18214.diff
No OneTemporary

D5555.id18214.diff

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

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)

Event Timeline