From c0c3d7fd34136bde0f866dd962eb67b06c8a894c Mon Sep 17 00:00:00 2001 From: cbmland Date: Sun, 14 Jul 2024 12:08:06 +0800 Subject: [PATCH] feat:add comments --- app/store/sync.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/store/sync.ts b/app/store/sync.ts index 0baa1f9d2..77ddb309c 100644 --- a/app/store/sync.ts +++ b/app/store/sync.ts @@ -92,14 +92,13 @@ export const useSyncStore = createPersistStore( }, async sync() { - const accessStore = useAccessStore.getState(); + const accessStore = useAccessStore.getState(); //to keep local access code const localState = getLocalAppState(); const provider = get().provider; const config = get()[provider]; const client = this.getClient(); //console.log("===== accessStore", accessStore); - try { const remoteState = await client.get(config.username); if (!remoteState || remoteState === "") { @@ -111,6 +110,7 @@ export const useSyncStore = createPersistStore( } else { let parsedRemoteState = JSON.parse(await client.get(config.username)); parsedRemoteState["access-control"] = accessStore; + //console.log("parsedRemoteState------", parsedRemoteState); mergeAppState(localState, parsedRemoteState); setLocalAppState(localState);