Skip to content

Commit

Permalink
Remove usage of "double arrows" in new gadgets for simpler Ragger tes…
Browse files Browse the repository at this point in the history
…ts integration.
  • Loading branch information
agrojean-ledger committed Nov 15, 2023
1 parent 0f0b84c commit 2fae98a
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions ledger_device_ui_sdk/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,25 +497,17 @@ impl<'a> MultiPageMenu<'a> {
match self.comm.next_event() {
io::Event::Button(button) => {
match button {
LeftButtonPress => {
LEFT_S_ARROW.instant_display();
}
RightButtonPress => {
RIGHT_S_ARROW.instant_display();
}
BothButtonsRelease => return EventOrPageIndex::Index(index),
b => {
match b {
LeftButtonRelease => {
LEFT_S_ARROW.erase();
if index as i16 - 1 < 0 {
index = self.pages.len() - 1;
} else {
index = index.saturating_sub(1);
}
}
RightButtonRelease => {
RIGHT_S_ARROW.erase();
if index < self.pages.len() - 1 {
index += 1;
} else {
Expand Down Expand Up @@ -751,16 +743,6 @@ impl<'a> MultiFieldReview<'a> {

loop {
match get_event(&mut buttons) {
Some(ButtonEvent::LeftButtonPress) => {
if cur_page > 0 {
LEFT_S_ARROW.instant_display();
}
}
Some(ButtonEvent::RightButtonPress) => {
if cur_page < total_page_count {
RIGHT_S_ARROW.instant_display();
}
}
Some(b) => {
match b {
ButtonEvent::LeftButtonRelease => {
Expand Down

0 comments on commit 2fae98a

Please sign in to comment.