Fixed cc toggling not calling subscription signal

This commit is contained in:
Erik Reider
2022-05-13 14:14:57 +02:00
parent 50d2274f60
commit 8319917b7b
2 changed files with 3 additions and 14 deletions

View File

@@ -275,6 +275,9 @@ namespace SwayNotificationCenter {
if (noti != null) noti.set_time ();
}
}
swaync_daemon.subscribe (notification_count (),
noti_daemon.dnd,
this.visible);
}
public void set_switch_dnd_state (bool state) {

View File

@@ -119,26 +119,12 @@ namespace SwayNotificationCenter {
if (noti_daemon.control_center.toggle_visibility ()) {
noti_daemon.set_noti_window_visibility (false);
}
try {
subscribe (noti_daemon.control_center.notification_count (),
get_dnd (),
get_visibility ());
} catch (Error e) {
stderr.printf (e.message + "\n");
}
}
/** Sets the visibility of the controlcenter */
public void set_visibility (bool visibility) throws DBusError, IOError {
noti_daemon.control_center.set_visibility (visibility);
if (visibility) noti_daemon.set_noti_window_visibility (false);
try {
subscribe (noti_daemon.control_center.notification_count (),
get_dnd (),
visibility);
} catch (Error e) {
stderr.printf (e.message + "\n");
}
}
/** Toggles the current Do Not Disturb state */