fix(tokenizer): avoid repeated yomitan anki sync checks on no-change

This commit is contained in:
2026-03-02 01:36:22 -08:00
parent 7161fc3513
commit cde231b1ff
4 changed files with 18 additions and 9 deletions

View File

@@ -2627,7 +2627,7 @@ async function syncYomitanDefaultProfileAnkiServer(): Promise<void> {
return;
}
const updated = await syncYomitanDefaultAnkiServerCore(
const synced = await syncYomitanDefaultAnkiServerCore(
targetUrl,
{
getYomitanExt: () => appState.yomitanExt,
@@ -2654,8 +2654,7 @@ async function syncYomitanDefaultProfileAnkiServer(): Promise<void> {
},
);
if (updated) {
logger.info(`Yomitan default profile Anki server set to ${targetUrl}`);
if (synced) {
lastSyncedYomitanAnkiServer = targetUrl;
}
}