mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-05 21:10:57 +00:00
fix(core): fix crash caused by marquee
request_anim_frame will register a timer for RequestPaint, which will then cause a crash. This commit fixes the crash, but makes the marquee component not work. [no changelog]
This commit is contained in:
parent
6d2c1566be
commit
38f0443000
@ -99,6 +99,9 @@ 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;
|
||||
}
|
||||
self.marquee.start(ctx, Instant::now());
|
||||
}
|
||||
return self.marquee.event(ctx, event);
|
||||
|
Loading…
Reference in New Issue
Block a user