From 8987c94b3654dd4ef40bea6745886a514bfa4532 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 5 Mar 2023 20:28:56 +0100 Subject: Show phonetics if present when answer is correct --- src/gui/message.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gui/message.rs') 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( 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; } } -- cgit v1.2.3