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:
parent
748a19ac5d
commit
f02007dd02
@ -98,13 +98,11 @@ 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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user