Repository navigation
Bridge: wake idle screens when background work changes them - #26
Merged
Merged
Conversation
SpruceOS #1890 makes PyUI wait up to a second between frames once a screen has settled, so a change made on another thread would show up to a second late: a downloaded badge, a game's achievements replacing "Loading achievements…", the sync status in the bottom bar. Controller.request_redraw() ends that wait from any thread. - Add ui/pyui/redraw.py: request_redraw() calls PyUI's Controller.request_redraw(), and does nothing on older SpruceOS, whose PyUI draws every frame anyway. - Give LazyMediaFetcher, DetailFetcher, BackgroundSync and ProgressTracker an on_change callback. It's called once the change can be seen (an image stored and its version bumped, a game's outcome recorded after its details are committed, each new sync status), and outside their locks. app.run sets it to redraw.request_redraw. - Bump pyui-tested-commit to 339d6921, which includes #1890. - Document idle frames and the wake-up in .agents/pyui.md and sync-and-storage.md.
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.
spruceUI/spruceOS#1890 makes PyUI wait up to a second between frames once a screen has settled, so a change made on another thread would show up to a second late: a downloaded badge, a game's achievements replacing "Loading achievements…", the sync status in the bottom bar. Controller.request_redraw() ends that wait from any thread.