From b9fb9ce24302d94f4e1a1a42f6a14022abef2178 Mon Sep 17 00:00:00 2001 From: matejcik Date: Mon, 25 Nov 2024 15:18:04 +0100 Subject: [PATCH] fix(core): use the filtered event for subsequent processing That way we won't pass raw touch events to underlying component if that touch is already part of a swipe. --- core/embed/rust/src/ui/flow/swipe.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/embed/rust/src/ui/flow/swipe.rs b/core/embed/rust/src/ui/flow/swipe.rs index d1f12c51a6..2268cb8ebd 100644 --- a/core/embed/rust/src/ui/flow/swipe.rs +++ b/core/embed/rust/src/ui/flow/swipe.rs @@ -216,7 +216,7 @@ impl SwipeFlow { let mut attach = false; - let e = if self.allow_swipe { + let event = if self.allow_swipe { let page = self.current_page(); let config = page .get_swipe_config() @@ -251,12 +251,12 @@ impl SwipeFlow { match decision { Decision::Nothing => { - decision = self.handle_event_child(ctx, e); + decision = self.handle_event_child(ctx, event); // when doing internal transition, pass attach event to the child after sending // swipe end. if attach { - if let Event::Swipe(SwipeEvent::End(dir)) = e { + if let Event::Swipe(SwipeEvent::End(dir)) = event { self.current_page_mut() .event(ctx, Event::Attach(AttachType::Swipe(dir))); }