fix: keep the player alive while a view is off-window - #82
Merged
Conversation
🦋 Changeset detectedLatest commit: cec4ec0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
If unFreeze() threw, the flag was already cleared, so the view forgot it owed a resume: the next detach saw a non-playing player and never re-armed, leaving the animation frozen for good. Clearing on success keeps the retry on the next re-attach and matches freezeWhileDetached().
theashraf
force-pushed
the
fix/no-reload-on-scroll-back
branch
from
July 30, 2026 07:46
fe4827e to
cec4ec0
Compare
samuelOsborne
approved these changes
Jul 30, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Leaving the window was treated as a teardown, so list recycling and screen transitions destroyed the player and rebuilt it on the way back — re-reading the source (re-fetching it, for remote URLs) and restarting from frame 0. Playback now freezes at the current frame and resumes on return; the player is released only on unmount.
Verified on an emulator and a simulator with a 12-row list: previously iOS reloaded all 12 rows per scroll cycle and Android 9; now zero. Mount/unmount teardown still runs (checked via a temporary
deinitprobe on iOS).