Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow state changes for brightness & gesture preference #444

Conversation

CarlosOlivo
Copy link
Contributor

Complement of #442

I think I found an error in your library @Maxr1998, or I am using it incorrectly?

D/SettingsFragment: appPreferences.exoPlayerAllowSwipeGestures = true
D/SettingsFragment: swipeGesturesPreference.checked = false
D/SettingsFragment: swipeGesturesPreference.getBoolean(false) = false

Could you check why it returns different values?

@Maxr1998
Copy link
Member

Maxr1998 commented Jun 19, 2021

D/SettingsFragment: appPreferences.exoPlayerAllowSwipeGestures = true
D/SettingsFragment: swipeGesturesPreference.checked = false
D/SettingsFragment: swipeGesturesPreference.getBoolean(false) = false

Could you check why it returns different values?

That's normal, when building the preference tree, it isn't attached to the context yet, so it returns default values. Once the screen builder finishes, it resolves all data from SharedPreferences. Using appPreferences is the correct choice in your case.
Could you reformat the file to move the && into the same line, and insert newlines to the callback?

@CarlosOlivo CarlosOlivo force-pushed the follow-brightness-gesture-state-preference branch from 7cf1b15 to ef0ed60 Compare June 19, 2021 20:15
@Maxr1998 Maxr1998 added this to In progress in v2.3.0 via automation Jun 19, 2021
@Maxr1998 Maxr1998 added enhancement New feature or request exoplayer Related to the ExoPlayer integration labels Jun 19, 2021
@Maxr1998 Maxr1998 merged commit 373d196 into jellyfin:master Jun 19, 2021
v2.3.0 automation moved this from In progress to Done Jun 19, 2021
@CarlosOlivo CarlosOlivo deleted the follow-brightness-gesture-state-preference branch June 19, 2021 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request exoplayer Related to the ExoPlayer integration
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants