Commit 8319917b authored by Erik Reider's avatar Erik Reider

Fixed cc toggling not calling subscription signal

parent 50d2274f
......@@ -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) {
......
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment