1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-07-06 06:42:33 +00:00

fix(core): mercury ui animations only ask for frame on timer event

[no changelog]
This commit is contained in:
tychovrahe 2024-05-22 22:30:46 +02:00 committed by TychoVrahe
parent e53e7cc13b
commit 429a558d78
3 changed files with 16 additions and 9 deletions

View File

@ -231,10 +231,13 @@ impl Component for HoldToConfirm {
} }
_ => (), _ => (),
} }
if let Event::Timer(EventCtx::ANIM_FRAME_TIMER) = event {
if self.anim.is_active() { if self.anim.is_active() {
ctx.request_anim_frame(); ctx.request_anim_frame();
ctx.request_paint(); ctx.request_paint();
} }
}
None None
} }

View File

@ -166,10 +166,12 @@ impl Component for StatusScreen {
ctx.request_paint(); ctx.request_paint();
ctx.request_anim_frame(); ctx.request_anim_frame();
} }
if let Event::Timer(EventCtx::ANIM_FRAME_TIMER) = event {
if self.anim.is_active() { if self.anim.is_active() {
ctx.request_anim_frame(); ctx.request_anim_frame();
ctx.request_paint(); ctx.request_paint();
} }
}
match self.dismiss_type { match self.dismiss_type {
DismissType::SwipeUp(ref mut swipe) => { DismissType::SwipeUp(ref mut swipe) => {

View File

@ -179,10 +179,12 @@ impl Component for TapToConfirm {
} }
_ => (), _ => (),
} }
if let Event::Timer(EventCtx::ANIM_FRAME_TIMER) = event {
if self.anim.is_active() { if self.anim.is_active() {
ctx.request_anim_frame(); ctx.request_anim_frame();
ctx.request_paint(); ctx.request_paint();
} }
}
if self.anim.is_finished() { if self.anim.is_finished() {
return Some(()); return Some(());
}; };