Skip to content
This repository was archived by the owner on Feb 9, 2022. It is now read-only.

Commit e1d8437

Browse files
authored
Audio settings bug (#82)
* Fix musicVolumeWidget is considered visible even if you are in the display tab (for changing brightness)
1 parent b0b822d commit e1d8437

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/util/event/DisableAudioEvent.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public final class DisableAudioEvent extends Event {
1212
private static final int areaSoundEffectVolumeConfig = 872;
1313

1414
private final CachedWidget soundSettingsWidget = new CachedWidget(new WidgetActionFilter("Audio"));
15-
private final CachedWidget musicVolumeWidget = new CachedWidget(new WidgetActionFilter("Adjust Music Volume"));
15+
private final CachedWidget audioSettingsWidget = new CachedWidget(new WidgetMessageFilter("Audio Settings"));
1616
private final CachedWidget soundEffectVolumeWidget = new CachedWidget(new WidgetActionFilter("Adjust Sound Effect Volume"));
1717
private final CachedWidget areaSoundEffectVolumeWidget = new CachedWidget(new WidgetActionFilter("Adjust Area Sound Volume"));
1818

@@ -24,7 +24,7 @@ public final int execute() throws InterruptedException {
2424
setFailed();
2525
} else if (getTabs().getOpen() != Tab.SETTINGS) {
2626
getTabs().open(Tab.SETTINGS);
27-
} else if (!musicVolumeWidget.isVisible(getWidgets())) {
27+
} else if (!audioSettingsWidget.isVisible(getWidgets())) {
2828
soundSettingsWidget.interact(getWidgets());
2929
} else if (!isVolumeDisabled(musicVolumeConfig)) {
3030
musicVolumeWidget.interact(getWidgets());
@@ -39,4 +39,4 @@ public final int execute() throws InterruptedException {
3939
private boolean isVolumeDisabled(final int config) {
4040
return getConfigs().get(config) == 4;
4141
}
42-
}
42+
}

0 commit comments

Comments
 (0)