mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-04 05:42:34 +00:00
refactor(core/rust): simplify match statement in footer.rs
This commit is contained in:
parent
f7ce99e7d7
commit
85d699a42d
@ -170,17 +170,13 @@ impl<'a> Component for Footer<'a> {
|
|||||||
self.progress = 0;
|
self.progress = 0;
|
||||||
}
|
}
|
||||||
Event::Swipe(SwipeEvent::Move(dir, progress)) => match dir {
|
Event::Swipe(SwipeEvent::Move(dir, progress)) => match dir {
|
||||||
Direction::Up => {
|
Direction::Up if self.swipe_allow_up => {
|
||||||
if self.swipe_allow_up {
|
self.progress = progress;
|
||||||
self.progress = progress;
|
self.dir = dir;
|
||||||
self.dir = dir;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Direction::Down => {
|
Direction::Down if self.swipe_allow_down => {
|
||||||
if self.swipe_allow_down {
|
self.progress = progress;
|
||||||
self.progress = progress;
|
self.dir = dir;
|
||||||
self.dir = dir;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user