mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-18 19:31:04 +00:00
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.
This commit is contained in:
parent
997c27adb3
commit
b9fb9ce243
@ -216,7 +216,7 @@ impl SwipeFlow {
|
|||||||
|
|
||||||
let mut attach = false;
|
let mut attach = false;
|
||||||
|
|
||||||
let e = if self.allow_swipe {
|
let event = if self.allow_swipe {
|
||||||
let page = self.current_page();
|
let page = self.current_page();
|
||||||
let config = page
|
let config = page
|
||||||
.get_swipe_config()
|
.get_swipe_config()
|
||||||
@ -251,12 +251,12 @@ impl SwipeFlow {
|
|||||||
|
|
||||||
match decision {
|
match decision {
|
||||||
Decision::Nothing => {
|
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
|
// when doing internal transition, pass attach event to the child after sending
|
||||||
// swipe end.
|
// swipe end.
|
||||||
if attach {
|
if attach {
|
||||||
if let Event::Swipe(SwipeEvent::End(dir)) = e {
|
if let Event::Swipe(SwipeEvent::End(dir)) = event {
|
||||||
self.current_page_mut()
|
self.current_page_mut()
|
||||||
.event(ctx, Event::Attach(AttachType::Swipe(dir)));
|
.event(ctx, Event::Attach(AttachType::Swipe(dir)));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user