1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-26 23:32:03 +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,9 +231,12 @@ impl Component for HoldToConfirm {
}
_ => (),
}
if self.anim.is_active() {
ctx.request_anim_frame();
ctx.request_paint();
if let Event::Timer(EventCtx::ANIM_FRAME_TIMER) = event {
if self.anim.is_active() {
ctx.request_anim_frame();
ctx.request_paint();
}
}
None
}

View File

@ -166,9 +166,11 @@ impl Component for StatusScreen {
ctx.request_paint();
ctx.request_anim_frame();
}
if self.anim.is_active() {
ctx.request_anim_frame();
ctx.request_paint();
if let Event::Timer(EventCtx::ANIM_FRAME_TIMER) = event {
if self.anim.is_active() {
ctx.request_anim_frame();
ctx.request_paint();
}
}
match self.dismiss_type {

View File

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