aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris2022-10-27 09:17:39 +0200
committerJoris2022-10-27 09:17:39 +0200
commite807957ce48368905f059c7b0c8e8116d98e37e1 (patch)
treef62000d8b24a17ab6d626adf10c5c6188e44721f
parent67856e653f49663dc72cbb01504e7ac9148f7ebe (diff)
downloadflashcards-e807957ce48368905f059c7b0c8e8116d98e37e1.tar.gz
flashcards-e807957ce48368905f059c7b0c8e8116d98e37e1.tar.bz2
flashcards-e807957ce48368905f059c7b0c8e8116d98e37e1.zip
Don’t show responses when correct
In case a question has many responses, we previously showed all the responses, no matter if it was answered correctly or not. But this gets too much is they eye, maybe because it’s associated with failure, because we show the response in this case. Just say it’s OK, there is no need to show the alternatives. Anyway, the alternatives will be asked in another card.
-rw-r--r--src/gui/question.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/question.rs b/src/gui/question.rs
index 727daa9..2060cb7 100644
--- a/src/gui/question.rs
+++ b/src/gui/question.rs
@@ -99,7 +99,7 @@ pub fn ask<B: Backend>(
difficulty: selected,
} = state.answer
{
- if !is_correct(&state.input, &card.responses) || card.responses.len() > 1 {
+ if !is_correct(&state.input, &card.responses) {
let paragraph = Paragraph::new(util::center_vertically(
chunks[3],
&serialization::words_to_line(&card.responses),