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
+9 -3
View File
@@ -1,6 +1,6 @@
use crate::display::primary_lcd::PrimaryLcdDisplay;
use crate::navigation::navigation::{Action, Navigable};
use crate::navigation::navigation::{Action, Navigable, NewState};
use crate::views::{menu_item, view::View};
use embedded_graphics::pixelcolor::Rgb565;
@@ -25,7 +25,13 @@ impl Navigable for SettingsMenu {
core::future::ready(())
}
fn handle_input(&self, _input: Action) -> impl core::future::Future<Output = View> + Send {
async move { View::Settings(SettingsMenu { selected: 0 }) }
fn handle_input(&self, input: Action) -> impl core::future::Future<Output = NewState> + Send {
async move {
NewState {
view: View::Settings(SettingsMenu { selected: 0 }),
replace_view: true,
redraw: !matches!(input, Action::Timer),
}
}
}
}