Merge pull request #119 from corollari/master

Add next review times when returning data in guiCurrentCard
This commit is contained in:
Alex Yatskov 2019-05-26 10:22:53 -07:00 committed by GitHub
commit 88f49a376a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -1277,13 +1277,15 @@ class AnkiConnect:
fields[name] = {'value': note.fields[order], 'order': order}
if card is not None:
buttonList = reviewer._answerButtonList()
return {
'cardId': card.id,
'fields': fields,
'fieldOrder': card.ord,
'question': card._getQA()['q'],
'answer': card._getQA()['a'],
'buttons': [b[0] for b in reviewer._answerButtonList()],
'buttons': [b[0] for b in buttonList],
'nextReviews': [reviewer.mw.col.sched.nextIvlStr(reviewer.card, b[0], True) for b in buttonList],
'modelName': model['name'],
'deckName': self.deckNameFromId(card.did),
'css': model['css'],

View File

@ -1555,7 +1555,8 @@ guarantee that your application continues to function properly in the future.
},
"template": "Forward",
"cardId": 1498938915662,
"buttons": [1, 2, 3]
"buttons": [1, 2, 3],
"nextReviews": ["<1m", "<10m", "4d"]
},
"error": null
}