fix: recognize actual button, not wrong one

This commit was merged in pull request #30.
This commit is contained in:
2026-08-22 18:29:35 +02:00
parent 07c5210d7b
commit b6f43d1055
7 changed files with 136 additions and 75 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
use crate::display::primary_lcd::PrimaryLcdDisplay;
use crate::navigation::inputs::ButtonAction;
use crate::navigation::navigation::CARD_DATA;
use crate::navigation::navigation::NewState;
@@ -96,7 +97,7 @@ impl Navigable for ScanMenu {
}
} else {
let new_progress = match input {
Action::Up => self.progress.wrapping_add(5),
Action::Button(ButtonAction::Up) => self.progress.wrapping_add(5),
_ => self.progress,
};
NewState {
@@ -104,7 +105,7 @@ impl Navigable for ScanMenu {
progress: new_progress,
}),
replace_view: true,
redraw: matches!(input, Action::Up | Action::Timer),
redraw: matches!(input, Action::Button(ButtonAction::Up) | Action::Timer),
}
}
}