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 @@ -31,11 +31,18 @@ const cookie = useSelector(state => state.cookie); const urlPrefix = useSelector(state => state.urlPrefix); const staffCanSee = useStaffCanSee(); + const currentLoggedInUserID: ?string = useSelector(state => + state.currentUserInfo?.anonymous ? undefined : state.currentUserInfo?.id, + ); React.useEffect(() => { if (storeLoaded || !rehydrateConcluded) { return; } + if (!currentLoggedInUserID) { + setStoreLoaded(true); + return; + } (async () => { try { const [threads, messages] = await Promise.all([ @@ -86,6 +93,7 @@ } })(); }, [ + currentLoggedInUserID, cookie, dispatch, rehydrateConcluded,