optimize debounce form & sync data

This commit is contained in:
Gabe Yuan
2023-08-17 13:27:22 +08:00
parent 30af4c11d0
commit 5d2e767e74
10 changed files with 155 additions and 144 deletions

View File

@@ -25,11 +25,7 @@ export function useRules() {
const updateAt = sync.opt?.rulesUpdateAt ? Date.now() : 0;
await storage.setObj(STOKEY_RULES, rules);
await sync.update({ rulesUpdateAt: updateAt });
try {
await syncRules();
} catch (err) {
console.log("[sync rules]", err);
}
syncRules();
};
const add = async (rule) => {