fix: recognize actual button, not wrong one
This commit was merged in pull request #30.
This commit is contained in:
@@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user