Fixed cc toggling not calling subscription signal
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user