feat: use cached annotations on subtitle change and skip pre-warmed cues (#97)

This commit is contained in:
2026-05-28 00:50:41 -07:00
committed by GitHub
parent d33009d4a3
commit eed0a6a243
10 changed files with 239 additions and 7 deletions
+8 -2
View File
@@ -526,7 +526,9 @@ export class AnkiIntegration {
}
private isKnownWordCacheEnabled(): boolean {
return this.config.knownWords?.highlightEnabled === true;
return (
this.config.knownWords?.highlightEnabled === true || this.config.nPlusOne?.enabled === true
);
}
private getConfiguredAnkiTags(): string[] {
@@ -549,7 +551,11 @@ export class AnkiIntegration {
}
async refreshKnownWordCache(): Promise<void> {
return this.knownWordCache.refresh(true);
const shouldNotify = this.isKnownWordCacheEnabled();
await this.knownWordCache.refresh(true);
if (shouldNotify) {
this.notifyKnownWordCacheUpdated();
}
}
private appendKnownWordsFromNoteInfo(noteInfo: NoteInfo): void {