mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-19 05:58:09 +00:00
fix(core/mercury): fix swipe effect duration when swipe is cancelled
This commit is contained in:
parent
272b668feb
commit
bfbcecc085
@ -290,7 +290,7 @@ impl SwipeDetect {
|
||||
|
||||
if !animation_disabled() {
|
||||
let done = self.moved as f32 / Self::PROGRESS_MAX as f32;
|
||||
let ratio = 1.0 - done;
|
||||
let ratio = if final_value == 0 { done } else { 1.0 - done };
|
||||
|
||||
let duration = config
|
||||
.duration(locked)
|
||||
|
Loading…
Reference in New Issue
Block a user