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

Fix appVolumeAdjuster when state is default #17321

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mltony
Copy link
Contributor

@mltony mltony commented Oct 24, 2024

Link to issue number:

#17300

Summary of the issue:

When AppVolumeAdjuster state is set to default, pressing OK or Apply button in settings sets the volume of all apps to 100%.

Description of user facing changes

Bug fixed. Now when AppVolumeAdjuster state is set to default, application volumes are not changed.

Description of development approach

Checking for state==default in the right place.

Testing strategy:

Manually tested use case from the issue above.

Known issues with pull request:

N/A

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@coderabbitai summary

@mltony mltony requested a review from a team as a code owner October 24, 2024 02:51
source/audio/appsVolume.py Outdated Show resolved Hide resolved
@@ -88,7 +89,7 @@ def _updateAppsVolumeImpl(
state: AppsVolumeAdjusterFlag,
):
global _activeCallback
if state == AppsVolumeAdjusterFlag.DISABLED:
if state in [AppsVolumeAdjusterFlag.DEFAULT, AppsVolumeAdjusterFlag.DISABLED]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If one day, the default state becomes "enabled" in the config spec, this statement will not work anymore. I guess that feature flags implement equality management so that comparing with default actually compares to its current value. It would be interesting to check here and to investigate why this equality management is not automatic here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was also under impression that it should happen automatically. Hence this bug. But it's not likely appVolumeAdjuster will ever be enabled by default - there is a strong opposition to that from some folks here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants