1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 14:28:07 +00:00

fix(core/ui): fix a bug causing marquee on model TR to not start

This commit is contained in:
matejcik 2024-12-10 15:07:53 +01:00
parent 748a19ac5d
commit f02007dd02

View File

@ -98,14 +98,12 @@ impl Component for Title {
fn event(&mut self, ctx: &mut EventCtx, event: Event) -> Option<Self::Msg> { fn event(&mut self, ctx: &mut EventCtx, event: Event) -> Option<Self::Msg> {
if self.needs_marquee { if self.needs_marquee {
if !self.marquee.is_animating() { if matches!(event, Event::Attach(_)) {
if matches!(Event::RequestPaint, _event) {
return None;
}
self.marquee.start(ctx, Instant::now()); self.marquee.start(ctx, Instant::now());
} } else {
return self.marquee.event(ctx, event); return self.marquee.event(ctx, event);
} }
}
None None
} }