Default to 'Bury Card' action consistently (#2950)

This commit is contained in:
Abdo 2024-01-19 08:49:16 +03:00 committed by GitHub
parent 8afd6480cb
commit f480ecea0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View File

@ -497,17 +497,17 @@ class Reviewer:
try:
answer_action = list(AnswerAction)[conf["answerAction"]]
except IndexError:
answer_action = AnswerAction.ANSWER_GOOD
if answer_action == AnswerAction.BURY_CARD:
self.bury_current_card()
elif answer_action == AnswerAction.ANSWER_AGAIN:
answer_action = AnswerAction.BURY_CARD
if answer_action == AnswerAction.ANSWER_AGAIN:
self._answerCard(1)
elif answer_action == AnswerAction.ANSWER_HARD:
self._answerCard(2)
elif answer_action == AnswerAction.ANSWER_GOOD:
self._answerCard(3)
elif answer_action == AnswerAction.SHOW_REMINDER:
tooltip(tr.studying_answer_time_elapsed())
else:
self._answerCard(3)
self.bury_current_card()
# Answering a card
############################################################

View File

@ -420,11 +420,11 @@ impl From<DeckConfig> for DeckConfSchema11 {
seconds_to_show_question: i.seconds_to_show_question,
seconds_to_show_answer: i.seconds_to_show_answer,
answer_action: match i.answer_action {
0 => AnswerAction::BuryCard,
1 => AnswerAction::AnswerAgain,
2 => AnswerAction::AnswerGood,
3 => AnswerAction::AnswerHard,
4 => AnswerAction::ShowReminder,
_ => AnswerAction::AnswerGood,
_ => AnswerAction::BuryCard,
},
wait_for_audio: i.wait_for_audio,
replayq: !i.skip_question_when_replaying_answer,