summaryrefslogtreecommitdiff
path: root/lib/notifd
diff options
context:
space:
mode:
authorAylur <[email protected]>2025-02-06 14:47:02 +0100
committerAylur <[email protected]>2025-02-06 14:47:02 +0100
commitc0eaca24dc7bc9f0091def5a37b14173e5bfd29e (patch)
treec895fb770df47f2b32ff9824c189a6d34c196d01 /lib/notifd
parentfe820611084391c5ecfc09cdeacbce8b7e9ed03d (diff)
fix(notifd): invalidate props from proxy
this fixes dont-disturb and ignore-timeout getters from the proxy, currently the cached values were returned which were set at launch and never changed might be a better idea to use the PropertiesChanged interface instead
Diffstat (limited to 'lib/notifd')
-rw-r--r--lib/notifd/proxy.vala14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/notifd/proxy.vala b/lib/notifd/proxy.vala
index 95e7105..ab0ae33 100644
--- a/lib/notifd/proxy.vala
+++ b/lib/notifd/proxy.vala
@@ -43,9 +43,8 @@ internal class AstalNotifd.DaemonProxy : Object {
private List<ulong> ids = new List<ulong>();
public void stop() {
- if (ids.length() > 0) {
- foreach (var id in ids)
- SignalHandler.disconnect(proxy, id);
+ foreach (var id in ids) {
+ SignalHandler.disconnect(proxy, id);
}
}
@@ -94,8 +93,15 @@ internal class AstalNotifd.DaemonProxy : Object {
add_notification(id);
ids.append(proxy.prop_changed.connect((prop) => {
- if (prop == "ignore-timeout" || prop == "dont-disturb")
+ if (prop == "dont-disturb") {
+ proxy.set_cached_property("DontDisturb", null);
notify_property(prop);
+ }
+
+ if (prop == "ignore-timeout") {
+ proxy.set_cached_property("IgnoreTimeout", null);
+ notify_property(prop);
+ }
}));
ids.append(proxy.notified.connect((id, replaced) => {