aboutsummaryrefslogtreecommitdiff
path: root/src/gui/message.rs
diff options
context:
space:
mode:
authorJoris2023-03-05 20:28:56 +0100
committerJoris2023-03-05 20:28:56 +0100
commit8987c94b3654dd4ef40bea6745886a514bfa4532 (patch)
treeccd951adea4c57583f0c247f8b073c125d884bc8 /src/gui/message.rs
parentae652a37ec2db6782565a9e843bc967e060d3906 (diff)
downloadflashcards-8987c94b3654dd4ef40bea6745886a514bfa4532.tar.gz
flashcards-8987c94b3654dd4ef40bea6745886a514bfa4532.tar.bz2
flashcards-8987c94b3654dd4ef40bea6745886a514bfa4532.zip
Show phonetics if present when answer is correct
Diffstat (limited to 'src/gui/message.rs')
-rw-r--r--src/gui/message.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/message.rs b/src/gui/message.rs
index f0d826a..61f57ba 100644
--- a/src/gui/message.rs
+++ b/src/gui/message.rs
@@ -1,6 +1,6 @@
use crate::gui::util;
-use crossterm::event::{self, Event, KeyCode, KeyModifiers};
use anyhow::Result;
+use crossterm::event::{self, Event, KeyCode, KeyModifiers};
use tui::{
backend::Backend,
layout::{Alignment, Constraint, Direction, Layout},
@@ -32,7 +32,10 @@ pub fn show<B: Backend>(
if wait {
if let Event::Key(key) = event::read()? {
- if key.code == KeyCode::Char('q') || key.code == KeyCode::Char('c') && key.modifiers.contains(KeyModifiers::CONTROL) {
+ if key.code == KeyCode::Char('q')
+ || key.code == KeyCode::Char('c')
+ && key.modifiers.contains(KeyModifiers::CONTROL)
+ {
break;
}
}