1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-17 03:48:09 +00:00

chore(core): Implement swipe back in confirm_fido flow menu

This commit is contained in:
Lukas Bielesch 2024-11-07 17:41:46 +01:00 committed by Lukáš Bielesch
parent 5e01288ba6
commit 99742e4862
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1 @@
[T3T1] Add swipe back in fido confirm flow menu.

View File

@ -49,6 +49,13 @@ impl FlowController for ConfirmFido {
fn handle_swipe(&'static self, direction: Direction) -> Decision { fn handle_swipe(&'static self, direction: Direction) -> Decision {
match (self, direction) { match (self, direction) {
(Self::Intro, Direction::Left) => Self::Menu.swipe(direction), (Self::Intro, Direction::Left) => Self::Menu.swipe(direction),
(Self::Menu, Direction::Right) => {
if Self::single_cred() {
Self::Details.swipe_right()
} else {
Self::Intro.swipe_right()
}
}
(Self::Intro, Direction::Up) => Self::ChooseCredential.swipe(direction), (Self::Intro, Direction::Up) => Self::ChooseCredential.swipe(direction),
(Self::ChooseCredential, Direction::Down) => Self::Intro.swipe(direction), (Self::ChooseCredential, Direction::Down) => Self::Intro.swipe(direction),
(Self::Details, Direction::Up) => Self::Tap.swipe(direction), (Self::Details, Direction::Up) => Self::Tap.swipe(direction),