Improve WebDAV data sync version handling and force sync (#207)

* Fix WebDAV auto sync default setting initialization

* Improve WebDAV data sync version handling and  force sync
This commit is contained in:
buste
2025-02-19 22:43:23 +08:00
committed by GitHub
parent ee0da9a26a
commit a630771f0b
4 changed files with 57 additions and 30 deletions

View File

@@ -56,6 +56,18 @@ void _checkOldConfigs() {
.map((e) => e.key)
.toList();
}
if (appdata.settings['webdavAutoSync'] == null) {
var webdavConfig = appdata.settings['webdav'];
if (webdavConfig is List &&
webdavConfig.length == 3 &&
webdavConfig.whereType<String>().length == 3) {
appdata.settings['webdavAutoSync'] = true;
} else {
appdata.settings['webdavAutoSync'] = false;
}
appdata.saveData();
}
}
Future<void> _checkAppUpdates() async {