Persist screen curtain state when changed through settings dialog#19836
Persist screen curtain state when changed through settings dialog#19836SaschaCowley merged 2 commits intobetafrom
Conversation
|
I guess though that you reintroduce #19765 for screen curtain. Have you checked this. |
Not to the best of my knowledge. The logic that @seanbudd introduced with #19652 handles making sure the state is restored on cancel. See the test table for my test findings. |
|
@SaschaCowley, sorry, I have just tested and can confirm that you reintroduce #19765 for applied to screen curtain case, i.e.:
Actual result: Expected result:
The issue with what is currently done is that information is saved in the config while playing in the settings dialog and then this information is cancelled from config in case you press |
|
@CyrilleB79 said
Thanks for catching that. I believe I have fixed it now. |
Link to issue number:
Fixes 19783
Summary of the issue:
When modified through the settings dialog, the state of the screen curtain is not persisted to the config.
Description of user facing changes:
The screen curtain state is now persisted to the config when changed through the settings dialog.
Description of developer facing changes:
None
Description of development approach:
Added a
_screenCurtainCheckboxChangedbool to the privacy and security panel. Initially set toFalse, it is set toTruewhen the user successfully interacts with the checkbox (that is, uses it to enable or disable the screen curtain). It is never set back toFalse. InonSave, store the state of the checkbox as the value ofconfig.conf["screenCurtain"]["enabled"] if and only if this new flag isTrue`.Testing strategy:
Tested altering the screen curtain state from the Privacy and Security settings panel as follows:
config.conf["screenCurtain"]["enabled"]config.conf["screenCurtain"]["enabled"]config.conf["screenCurtain"]["enabled"]FalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseTrueFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseFalseTrueTrueTrueTrueTrueTrueTrueTrueTrueTrueTrueTrueFalseTrueTrueTrueTrueTrueTrueKnown issues with pull request:
It's possibly slightly unintuitive that starting from a temporary screen curtain, if one unchecks then checks the screen curtain checkbox and saves settings, the screen curtain will subsequently be enabled, not temporary.
Code Review Checklist: