Page MenuHomePhabricator

D5555.diff
No OneTemporary

D5555.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
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)

Event Timeline