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