mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-26 03:31:24 +08:00
fix: Nutstore auto-sync when app starts (#5005)
feat: integrate Nutstore auto-sync functionality in initialization process
This commit is contained in:
parent
7d66892b21
commit
69962e836f
@ -3,6 +3,7 @@ import './utils/analytics'
|
||||
import KeyvStorage from '@kangfenmao/keyv-storage'
|
||||
|
||||
import { startAutoSync } from './services/BackupService'
|
||||
import { startNutstoreAutoSync } from './services/NutstoreService'
|
||||
import store from './store'
|
||||
|
||||
function initSpinner() {
|
||||
@ -20,9 +21,13 @@ function initKeyv() {
|
||||
function initAutoSync() {
|
||||
setTimeout(() => {
|
||||
const { webdavAutoSync } = store.getState().settings
|
||||
const { nutstoreAutoSync } = store.getState().nutstore
|
||||
if (webdavAutoSync) {
|
||||
startAutoSync()
|
||||
}
|
||||
if (nutstoreAutoSync) {
|
||||
startNutstoreAutoSync()
|
||||
}
|
||||
}, 2000)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user