1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 06:18: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,13 +98,11 @@ impl Component for Title {
fn event(&mut self, ctx: &mut EventCtx, event: Event) -> Option<Self::Msg> {
if self.needs_marquee {
if !self.marquee.is_animating() {
if matches!(Event::RequestPaint, _event) {
return None;
}
if matches!(event, Event::Attach(_)) {
self.marquee.start(ctx, Instant::now());
} else {
return self.marquee.event(ctx, event);
}
return self.marquee.event(ctx, event);
}
None
}