Skip gql subscriptions until auth is properly set up

This commit is contained in:
schroda
2025-11-06 21:38:00 +01:00
parent 8ac93ff3ff
commit b062871163
2 changed files with 20 additions and 9 deletions

View File

@@ -124,7 +124,9 @@ const InitialBackgroundRequests = () => {
* and thus, data of existing chapters/mangas in the cache get outdated
*/
const BackgroundSubscriptions = () => {
const skipConnection = !AuthManager.useIsAuthenticated();
const { isAuthRequired, accessToken } = AuthManager.useSession();
const skipConnection = isAuthRequired === null || (isAuthRequired && !accessToken);
requestManager.useDownloadSubscription({ skip: skipConnection });
requestManager.useUpdaterSubscription({ skip: skipConnection });