Implemented Scan card menu

This commit was merged in pull request #29.
This commit is contained in:
2026-08-22 13:35:58 +02:00
parent cf6c068394
commit b44ae59c8b
14 changed files with 189 additions and 89 deletions
+7 -5
View File
@@ -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)
}
}