Implemented Scan card menu
This commit was merged in pull request #29.
This commit is contained in:
@@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user