add sync test button

This commit is contained in:
Gabe Yuan
2023-08-26 14:31:13 +08:00
parent e0ccc298f9
commit a3cdcb2a1a
7 changed files with 117 additions and 63 deletions

View File

@@ -2,7 +2,7 @@ import { STOKEY_SETTING } from "../config";
import storage from "../libs/storage";
import { useStorages } from "./Storage";
import { useSync } from "./Sync";
import { syncSetting } from "../libs/sync";
import { trySyncSetting } from "../libs/sync";
/**
* 设置hook
@@ -23,6 +23,6 @@ export function useSettingUpdate() {
const updateAt = sync.opt?.settingUpdateAt ? Date.now() : 0;
await storage.putObj(STOKEY_SETTING, obj);
await sync.update({ settingUpdateAt: updateAt });
syncSetting();
trySyncSetting();
};
}