mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-07 19:21:32 -07:00
feat(stats): add v1 immersion stats dashboard (#19)
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
export function handleCharacterDictionaryAutoSyncComplete(
|
||||
completion: {
|
||||
mediaId: number;
|
||||
mediaTitle: string;
|
||||
changed: boolean;
|
||||
},
|
||||
deps: {
|
||||
hasParserWindow: () => boolean;
|
||||
clearParserCaches: () => void;
|
||||
invalidateTokenizationCache: () => void;
|
||||
refreshSubtitlePrefetch: () => void;
|
||||
refreshCurrentSubtitle: () => void;
|
||||
logInfo: (message: string) => void;
|
||||
},
|
||||
): void {
|
||||
if (completion.changed) {
|
||||
if (deps.hasParserWindow()) {
|
||||
deps.clearParserCaches();
|
||||
}
|
||||
deps.invalidateTokenizationCache();
|
||||
deps.refreshSubtitlePrefetch();
|
||||
deps.refreshCurrentSubtitle();
|
||||
}
|
||||
deps.logInfo(
|
||||
`[dictionary:auto-sync] refreshed current subtitle after sync (AniList ${completion.mediaId}, changed=${completion.changed ? 'yes' : 'no'}, title=${completion.mediaTitle})`,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user