Implemented Scan card menu
This commit was merged in pull request #29.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use crate::display::sprite::render_sprite_onto_ili9341;
|
||||
use crate::navigation::navigation::NewState;
|
||||
use alloc::format;
|
||||
use embedded_graphics::mono_font::MonoTextStyle;
|
||||
use embedded_graphics::mono_font::ascii::FONT_6X10;
|
||||
@@ -99,12 +100,13 @@ impl Navigable for CardView {
|
||||
core::future::ready(())
|
||||
}
|
||||
|
||||
fn handle_input(&self, input: Action) -> impl core::future::Future<Output = View> + Send {
|
||||
let new_menu = match input {
|
||||
Action::Ok => View::Card(self.clone()),
|
||||
_ => View::Card(self.clone()),
|
||||
fn handle_input(&self, input: Action) -> impl core::future::Future<Output = NewState> + Send {
|
||||
let new_state = NewState {
|
||||
view: View::Card(self.clone()),
|
||||
replace_view: true,
|
||||
redraw: !matches!(input, Action::Timer),
|
||||
};
|
||||
|
||||
future::ready(new_menu)
|
||||
future::ready(new_state)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user