From e6802bdd0971326b16d26dc681ef81f5f19595c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ioan=20Biz=C4=83u?= Date: Fri, 6 Dec 2024 13:42:32 +0100 Subject: [PATCH] fix(core/ui): don't swipe left if there is no menu --- core/.changelog.d/4421.fixed | 1 + core/embed/rust/src/ui/model_mercury/flow/confirm_action.rs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 core/.changelog.d/4421.fixed diff --git a/core/.changelog.d/4421.fixed b/core/.changelog.d/4421.fixed new file mode 100644 index 0000000000..c4ac3476bb --- /dev/null +++ b/core/.changelog.d/4421.fixed @@ -0,0 +1 @@ +[T3T1] Fix swiping into empty page. diff --git a/core/embed/rust/src/ui/model_mercury/flow/confirm_action.rs b/core/embed/rust/src/ui/model_mercury/flow/confirm_action.rs index afda7464a9..73385fae7c 100644 --- a/core/embed/rust/src/ui/model_mercury/flow/confirm_action.rs +++ b/core/embed/rust/src/ui/model_mercury/flow/confirm_action.rs @@ -248,7 +248,6 @@ fn new_confirm_action_uni( let mut content = Frame::left_aligned(strings.title, content) .with_margin(frame_margin) .with_swipe(Direction::Up, SwipeSettings::default()) - .with_swipe(Direction::Left, SwipeSettings::default()) .with_vertical_pages() .with_footer( TR::instructions__swipe_up.into(), @@ -257,7 +256,9 @@ fn new_confirm_action_uni( match extra { ConfirmActionExtra::Menu { .. } => { - content = content.with_menu_button(); + content = content + .with_menu_button() + .with_swipe(Direction::Left, SwipeSettings::default()); } ConfirmActionExtra::Cancel => { content = content.with_cancel_button();