Commit cf99b1d
committed
fix(android-legacy): refresh the VMI snapshot eagerly when binding changes
The snapshot getter's posted-refresh design broke the read-after-bind
contract: autoplay-false-trigger's issue #156 guard binds via the
dataBind prop and does a one-shot getViewModelInstance() read, which
returned the stale (null) snapshot on android-legacy (iOS still reads
synchronously). Binding always happens on the main thread, so refresh
the snapshot right where it changes (bindViewModelInstance and
bindToStateMachine) — a JS read after binding then sees a fresh value
with no blocking and no polling needed.1 parent 7677a56 commit cf99b1d
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
168 | 172 | | |
169 | 173 | | |
170 | 174 | | |
| |||
381 | 385 | | |
382 | 386 | | |
383 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
384 | 391 | | |
385 | 392 | | |
386 | 393 | | |
| |||
0 commit comments