Skip to content

Commit caa70f3

Browse files
committed
AppRow: Fix default toggle position
1 parent 8261fc6 commit caa70f3

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/AppRow.vala

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ public class Sound.AppRow : Gtk.Grid {
6464
});
6565

6666
icon_button.clicked.connect (() => toggle_mute_application ());
67-
68-
mute_switch.state_set.connect ((state) => {
69-
toggle_mute_application (!state);
70-
return true;
71-
});
7267
}
7368

7469
private void toggle_mute_application (bool? custom = null) {
@@ -116,6 +111,12 @@ public class Sound.AppRow : Gtk.Grid {
116111
visible = app.hidden;
117112

118113
volume_scale.set_value (app.volume);
114+
mute_switch.set_active (!app.muted);
115+
116+
mute_switch.state_set.connect ((state) => {
117+
toggle_mute_application (!state);
118+
return true;
119+
});
119120
}
120121

121122
public void unbind_app () {

0 commit comments

Comments
 (0)