diff options
author | Joris | 2023-03-05 20:28:56 +0100 |
---|---|---|
committer | Joris | 2023-03-05 20:28:56 +0100 |
commit | 8987c94b3654dd4ef40bea6745886a514bfa4532 (patch) | |
tree | ccd951adea4c57583f0c247f8b073c125d884bc8 /src/gui/message.rs | |
parent | ae652a37ec2db6782565a9e843bc967e060d3906 (diff) |
Show phonetics if present when answer is correct
Diffstat (limited to 'src/gui/message.rs')
-rw-r--r-- | src/gui/message.rs | 7 |
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; } } |