`_start` was assigned from `currentSystemFrameTimeStamp` (raw, since-boot) while the frame callback's `ts` parameter is epoch-adjusted (since the binding's first observed frame). The two live in different time domains; `dt = (ts - _start) / animDuration` came out massively negative, `clamp(0, 1)` pinned `t = 0`, and `_current` never moved past `_from` no matter how many frames fired. The bug was masked on most flows because `_current` happened to coincide with the post-animation target value already, but it surfaced on Android EMUI 12 after dismissing a gallery from a keyboard-open chat: the bottom inset stayed at 0 instead of animating back to the nav-bar height, leaving the composer flush with the screen edge and the system nav bar painted on top of it. Opening the keyboard again forced an unrelated metric pump that finally drove `_tick` to completion. Fix: capture `_start` lazily from the first `_tick`'s `ts`, so both sides of the subtraction live in the same epoch-adjusted domain. Regression test asserts viewPadding advances past `_from` across pumped frames; pre-fix it stayed at 0.
1.6 KiB
1.6 KiB