mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-07 03:22:17 -08:00
feat: add AniList character dictionary sync
This commit is contained in:
@@ -720,6 +720,24 @@ export class DictionaryController {
|
||||
modal.setVisible(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} dictionaryTitle
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async deleteDictionaryNow(dictionaryTitle) {
|
||||
const dictionaries = await this._settingsController.getDictionaryInfo();
|
||||
if (!dictionaries.some((dictionary) => dictionary.title === dictionaryTitle)) {
|
||||
return;
|
||||
}
|
||||
|
||||
await this._deleteDictionary(dictionaryTitle);
|
||||
|
||||
const remaining = await this._settingsController.getDictionaryInfo();
|
||||
if (remaining.some((dictionary) => dictionary.title === dictionaryTitle)) {
|
||||
throw new Error(`Dictionary still present after delete: ${dictionaryTitle}`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} dictionaryTitle
|
||||
* @returns {Promise<string[]>}
|
||||
|
||||
Reference in New Issue
Block a user