From 5831921db429227223d82976572cf40b053a135c Mon Sep 17 00:00:00 2001 From: Ldoppea Date: Tue, 30 Jul 2024 19:19:22 +0200 Subject: [PATCH] feat: Ignore queries warmup on PouchLink With previous changes, we now expect the CozyPouchLink to be the last link of the chain, so forwarding the query would result to an exception thrown This mean we cannot forward the query when warmup queries are not finished yet So we want to allow CozyPouchLink to ignore the verification step and process the query independently of the warmup queries status To allow this we introduce the `ignoreWarmup` parameter. When set to `true` the CozyPouchLink will process the query even if warmup is not finished yet Related PR: cozy/cozy-client#1506 --- src/pouchdb/getLinks.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pouchdb/getLinks.ts b/src/pouchdb/getLinks.ts index ac6e565f9..5ad1d6abe 100644 --- a/src/pouchdb/getLinks.ts +++ b/src/pouchdb/getLinks.ts @@ -29,7 +29,8 @@ export const getLinks = (): CozyLink[] => { const pouchLinkOptions = { doctypes: offlineDoctypes, initialSync: true, - platform: platformReactNative + platform: platformReactNative, + ignoreWarmup: true } const stackLink = new StackLink({