mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-03-25 04:25:42 +00:00
fix(core): correct Delizia loader completion detection
This issue was found while debugging a flaky click test: `tests/click_tests/test_lock.py::test_hold_to_lock` Sample failures: https://github.com/trezor/trezor-firmware/actions/runs/13209659963/job/36880750418 https://github.com/trezor/trezor-firmware/actions/runs/13189762414/job/36820368643 https://github.com/trezor/trezor-firmware/actions/runs/13146713535/job/36686537519 https://github.com/trezor/trezor-firmware/actions/runs/13124809110/job/36619045092 https://github.com/trezor/trezor-firmware/actions/runs/13103415015/job/36554567296 https://github.com/trezor/trezor-firmware/actions/runs/13093382180/job/36532710349 [no changelog]
This commit is contained in:
parent
ffc4b57e70
commit
0abfc7b1f9
@ -139,11 +139,17 @@ impl Loader {
|
||||
}
|
||||
|
||||
pub fn is_completely_grown(&self, now: Instant) -> bool {
|
||||
matches!(self.progress(now), Some(display::LOADER_MAX))
|
||||
match &self.state {
|
||||
State::Growing(a) => a.finished(now),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_completely_shrunk(&self, now: Instant) -> bool {
|
||||
matches!(self.progress(now), Some(display::LOADER_MIN))
|
||||
match &self.state {
|
||||
State::Shrinking(a) => a.finished(now),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -154,11 +154,17 @@ impl Loader {
|
||||
}
|
||||
|
||||
pub fn is_completely_grown(&self, now: Instant) -> bool {
|
||||
matches!(self.progress(now), Some(display::LOADER_MAX))
|
||||
match &self.state {
|
||||
State::Growing(a) => a.finished(now),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_completely_shrunk(&self, now: Instant) -> bool {
|
||||
matches!(self.progress(now), Some(display::LOADER_MIN))
|
||||
match &self.state {
|
||||
State::Shrinking(a) => a.finished(now),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn render_loader<'s>(
|
||||
|
@ -143,11 +143,17 @@ impl Loader {
|
||||
}
|
||||
|
||||
pub fn is_completely_grown(&self, now: Instant) -> bool {
|
||||
matches!(self.progress_raw(now), Some(display::LOADER_MAX))
|
||||
match &self.state {
|
||||
State::Growing(a) => a.finished(now),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_completely_shrunk(&self, now: Instant) -> bool {
|
||||
matches!(self.progress_raw(now), Some(display::LOADER_MIN))
|
||||
match &self.state {
|
||||
State::Shrinking(a) => a.finished(now),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user