mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-10-21 05:01:26 -07:00
feat: use cached annotations on subtitle change and skip pre-warmed cues (#97)
This commit is contained in:
1 parent
d33009d4a3
commit
eed0a6a243
10 files changed
+239
-7
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user