WIP
This commit is contained in:
parent
d770030688
commit
786ef851c9
@ -349,7 +349,6 @@ function populateAnkiDeckAndModel(opts) {
|
|||||||
showAnkiSpinner(true);
|
showAnkiSpinner(true);
|
||||||
|
|
||||||
const ankiFormat = $('#anki-format').hide();
|
const ankiFormat = $('#anki-format').hide();
|
||||||
|
|
||||||
return Promise.all([anki().getDeckNames(), anki().getModelNames()]).then(([deckNames, modelNames]) => {
|
return Promise.all([anki().getDeckNames(), anki().getModelNames()]).then(([deckNames, modelNames]) => {
|
||||||
const ankiDeck = $('.anki-deck');
|
const ankiDeck = $('.anki-deck');
|
||||||
ankiDeck.find('option').remove();
|
ankiDeck.find('option').remove();
|
||||||
@ -441,7 +440,7 @@ function onOptionsChanged(e) {
|
|||||||
showAnkiError(null);
|
showAnkiError(null);
|
||||||
showAnkiSpinner(true);
|
showAnkiSpinner(true);
|
||||||
return anki().logout().then(() => populateAnkiDeckAndModel(optsNew));
|
return anki().logout().then(() => populateAnkiDeckAndModel(optsNew));
|
||||||
} else if (loginChanged || optsNew.ankiMethod !== optsOld.ankiMethod) {
|
} else if (optsNew.ankiMethod !== optsOld.ankiMethod) {
|
||||||
showAnkiError(null);
|
showAnkiError(null);
|
||||||
showAnkiSpinner(true);
|
showAnkiSpinner(true);
|
||||||
return populateAnkiDeckAndModel(optsNew);
|
return populateAnkiDeckAndModel(optsNew);
|
||||||
|
Loading…
Reference in New Issue
Block a user