From 0318954c99f8f55681e299de461a40bb5751ae16 Mon Sep 17 00:00:00 2001 From: Crash-- Date: Tue, 4 Jul 2023 16:17:54 +0200 Subject: [PATCH] fix: Set the fresh data as data to show --- package.json | 4 ++-- src/components/AppWrapper.jsx | 5 ++++- src/lib/konnectors_typed.ts | 4 +++- yarn.lock | 22 +++++++++++----------- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index ba9da9d346..0be92b963f 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "homepage": "https://github.com/cozy/cozy-home#readme", "dependencies": { "@cozy/minilog": "1.0.0", - "cozy-client": "^36.2.0", + "cozy-client": "^38.9.1", "cozy-device-helper": "2.7.0", "cozy-doctypes": "1.83.8", "cozy-flags": "3.0.1", @@ -45,7 +45,7 @@ "cozy-logger": "1.10.0", "cozy-realtime": "4.2.9", "cozy-sharing": "7.1.0", - "cozy-stack-client": "^36.2.0", + "cozy-stack-client": "^38.7.1", "cozy-tsconfig": "1.2.0", "cozy-ui": "^88.1.1", "date-fns": "2.28.0", diff --git a/src/components/AppWrapper.jsx b/src/components/AppWrapper.jsx index c4074f0610..874553f718 100644 --- a/src/components/AppWrapper.jsx +++ b/src/components/AppWrapper.jsx @@ -19,6 +19,7 @@ import { import configureStore from 'store/configureStore' import homeConfig from 'config/home.json' import { RealtimePlugin } from 'cozy-realtime' +import { isFlagshipApp } from 'cozy-device-helper' import { usePreferedTheme } from 'hooks/usePreferedTheme' @@ -44,7 +45,9 @@ export const setupAppContext = memoize(() => { uri: `${window.location.protocol}//${data.cozyDomain}`, schema, token: data.cozyToken, - store: false + store: false, + backgroundFetching: + isFlagshipApp() || flag('home.store.persist') ? true : false }) const legacyClient = new LegacyCozyClient({ cozyURL: `//${data.cozyDomain}`, diff --git a/src/lib/konnectors_typed.ts b/src/lib/konnectors_typed.ts index 7df44e008f..2f76e0a152 100644 --- a/src/lib/konnectors_typed.ts +++ b/src/lib/konnectors_typed.ts @@ -24,7 +24,9 @@ export const fetchRunningKonnectors = { state: 'running' }), - options: { as: 'io.cozy.jobs/running/konnector/messageKonnector' } + options: { + as: 'io.cozy.jobs/running/konnector/messageKonnector' + } } /** diff --git a/yarn.lock b/yarn.lock index f55c7729ec..c0a771ce28 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8910,16 +8910,16 @@ cozy-client-js@0.20.0: pouchdb-browser "7.0.0" pouchdb-find "7.0.0" -cozy-client@^36.2.0: - version "36.2.0" - resolved "https://registry.yarnpkg.com/cozy-client/-/cozy-client-36.2.0.tgz#662a659415dd9c7d8ae0d69e6c445bcbdaf1a935" - integrity sha512-CLom7iJ8b3cCPvA537BNxe7n1DGE6vM48P/xtjLB+Hl7ZKFWMiWSWKHgfQqxKwrDxwnNDD9XJ7VCxwlMBdqpWw== +cozy-client@^38.9.1: + version "38.9.1" + resolved "https://registry.yarnpkg.com/cozy-client/-/cozy-client-38.9.1.tgz#9cd4e38bc157157c90625af243605f19df67df06" + integrity sha512-tCJbrmTZbvzy2bHpzI9FeC4CbdD7XI7N6SY51C6p7Rf+Ppc/UaqviAuVy0+V8q+xBbORAaefQHAZVBWO8mgcEA== dependencies: "@cozy/minilog" "1.0.0" "@types/jest" "^26.0.20" "@types/lodash" "^4.14.170" btoa "^1.2.1" - cozy-stack-client "^36.2.0" + cozy-stack-client "^38.7.1" date-fns "2.29.3" json-stable-stringify "^1.0.1" lodash "^4.17.13" @@ -9174,10 +9174,10 @@ cozy-sharing@7.1.0: react-tooltip "^3.11.1" snarkdown "^2.0.0" -cozy-stack-client@^36.2.0: - version "36.2.0" - resolved "https://registry.yarnpkg.com/cozy-stack-client/-/cozy-stack-client-36.2.0.tgz#7e012279519128355c4886ac973cd062c7c4b2aa" - integrity sha512-E2eLDmCmYJQh/9WwR77mXs+/aoxB/dbRBxj2Q7LItr9ypTXSFaWZEjiTu7fiu83p04BwybAkzI26Zc4aBbpjRg== +cozy-stack-client@^38.7.1: + version "38.7.1" + resolved "https://registry.yarnpkg.com/cozy-stack-client/-/cozy-stack-client-38.7.1.tgz#daa4e59c7c9e3c5d548924f52547110a1c75052d" + integrity sha512-+5tfMAdZV6nf6iPGs0QyxDpk/rfiLjR953PRrNL67rQt4SbGSyHv7C6Uklu6TD6H84yzoSyar6i//VET+wIcQA== dependencies: detect-node "^2.0.4" mime "^2.4.0" @@ -16050,9 +16050,9 @@ msgpack5@^4.0.2: readable-stream "^2.3.6" safe-buffer "^5.1.2" -"mui-bottom-sheet@git+https://github.com/cozy/mui-bottom-sheet.git#v1.0.9": +"mui-bottom-sheet@https://github.com/cozy/mui-bottom-sheet.git#v1.0.9": version "1.0.8" - resolved "git+https://github.com/cozy/mui-bottom-sheet.git#3dc4c2a245ab39079bc2f73546bccf80847be14c" + resolved "https://github.com/cozy/mui-bottom-sheet.git#3dc4c2a245ab39079bc2f73546bccf80847be14c" dependencies: "@juggle/resize-observer" "^3.1.3" jest-environment-jsdom-sixteen "^1.0.3"