Add return values

This commit is contained in:
Henrik Giesel 2019-05-04 23:24:13 +02:00
parent 08109dafbd
commit db602ebe9a

View File

@ -977,6 +977,8 @@ class AnkiConnect:
aqt.dialogs.open(windowName, self.window())
addCards.setAndFocusNote(editor.note)
return ankiNote.id
elif note is not None:
currentWindow = aqt.dialogs._dialogs['AddCards'][1]
@ -1011,10 +1013,14 @@ class AnkiConnect:
else:
openNewWindow()
return aqt.dialogs._dialogs['AddCards'][1].editor.note.id
else:
addCards = aqt.dialogs.open('AddCards', self.window())
addCards.activateWindow()
return addCards.editor.note.id
@util.api()
def guiReviewActive(self):
return self.reviewer().card is not None and self.window().state == 'review'