Repository navigation
Apply refresh-rate modes app-wide and target a real 60 Hz mode - #320
Merged
Merged
Conversation
Replace the per-screen refresh-rate wrapper with a single controller mounted above the app. It applies the stored preference after loading, reacts to preference changes, and re-applies on resume so changes made in Settings take effect immediately.
- Standard mode now picks the advertised mode nearest 60 Hz instead of the panel's lowest rate. - Apply mode changes immediately app-wide, restore the saved mode after window recreation, and avoid false rejections while backgrounded.
Replace the per-screen DisplayModeWrapper with a single DisplayModeController wrapping the app, and make the display mode service restore and re-apply the saved refresh rate on startup and window recreation. Screen-agnostic reapplication removes redundant per-mount, resume, and background-change requests. Also expose app preferences load completion so display mode changes wait for persisted settings, and document the refresh-rate fixes in the changelog.
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.
Summary
Finishes the refresh-rate work from 0.22.2-beta.4: one app-wide controller applies the selected mode immediately, the 60 Hz option means ~60 Hz instead of the panel's lowest rate, and saved modes survive preference loading and Android window recreation.
App-wide application
DisplayModeWrapperfrom every screen (albums, artists, favorites, folders, menu, recap, player, settings, songs and more) and relies on the singleDisplayModeControllermounted above the app.AppPreferencesNotifierexposes aloadedfuture, andsetRefreshRateModewaits for persisted values before comparing or writing, so startup defaults can no longer overwrite an explicitly chosen mode.60 Hz selection
standardnow picks the advertised mode closest to 60 Hz at the current resolution (within 5 Hz, so 59.94 Hz panels match) instead of the lowest rate, which could be a 10 Hz low-power mode.adaptiveandhighbehave as before.Restore and reapplication
FlutterDisplayMode.preferred), not merely because Flick requested it earlier — Android can recreate a window without restarting Dart.Verification correctness
Future.delayedverification with a cancellable timer guarded by a request token, foreground state, and platform support, so superseded lookups cannot overwrite a newer selection.Release notes
CHANGELOG.md,docs/RELEASE_0.22.2-beta.4.md, and the in-app changelog with the real-60 Hz behavior, immediate application, and restore-on-reopen.Related issue
Related to #210 (Fairphone 6 refresh-rate fallback)
Checklist
flutter analyzepassesflutter testpassescargo test --manifest-path rust/Cargo.tomlpassesflutter run --flavor full)CHANGELOG.mdupdated for user-facing changes