diff --git a/core/embed/rust/src/ui/flow/page.rs b/core/embed/rust/src/ui/flow/page.rs index 81bf465214..06b8ba437f 100644 --- a/core/embed/rust/src/ui/flow/page.rs +++ b/core/embed/rust/src/ui/flow/page.rs @@ -7,6 +7,7 @@ use crate::{ flow::base::Swipable, geometry::{Axis, Offset, Rect}, shape::Renderer, + util, }, }; @@ -124,6 +125,15 @@ impl Swipable for SwipePage { } _ => {} }; + self.current = match direction { + SwipeDirection::Left | SwipeDirection::Up => (self.current + 1).min(self.pages - 1), + SwipeDirection::Right | SwipeDirection::Down => self.current.saturating_sub(1), + }; + if util::animation_disabled() { + self.inner.change_page(self.current); + ctx.request_paint(); + return true; + } self.transition = Some(Transition { cloned: unwrap!(Gc::new(self.inner.clone())), animation: Animation::new( @@ -134,10 +144,6 @@ impl Swipable for SwipePage { ), direction, }); - self.current = match direction { - SwipeDirection::Left | SwipeDirection::Up => (self.current + 1).min(self.pages - 1), - SwipeDirection::Right | SwipeDirection::Down => self.current.saturating_sub(1), - }; self.inner.change_page(self.current); ctx.request_anim_frame(); ctx.request_paint(); diff --git a/core/embed/rust/src/ui/flow/swipe.rs b/core/embed/rust/src/ui/flow/swipe.rs index 95c946d5dc..599026f899 100644 --- a/core/embed/rust/src/ui/flow/swipe.rs +++ b/core/embed/rust/src/ui/flow/swipe.rs @@ -7,6 +7,7 @@ use crate::{ flow::{base::Decision, FlowMsg, FlowState, FlowStore}, geometry::{Offset, Rect}, shape::Renderer, + util, }, }; @@ -63,6 +64,12 @@ impl SwipeFlow { self.transition = Transition::Internal; return; } + if util::animation_disabled() { + self.state = state; + self.store.event(state.index(), ctx, Event::Attach); + ctx.request_paint(); + return; + } self.transition = Transition::External { prev_state: self.state, animation: Animation::new(