From e164aafcb9a7830a8042f5501dd678455bc2e37c Mon Sep 17 00:00:00 2001 From: Aylur Date: Mon, 30 Sep 2024 11:06:10 +0000 Subject: fix(notifd): check ignore-timeout after Notify calls too #32 --- lib/notifd/daemon.vala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/notifd/daemon.vala') diff --git a/lib/notifd/daemon.vala b/lib/notifd/daemon.vala index e918201..b7a76df 100644 --- a/lib/notifd/daemon.vala +++ b/lib/notifd/daemon.vala @@ -133,7 +133,9 @@ internal class AstalNotifd.Daemon : Object { if (!ignore_timeout && expire_timeout > 0) { Timeout.add(expire_timeout, () => { - resolved(id, ClosedReason.EXPIRED); + if (!ignore_timeout) { + resolved(id, ClosedReason.EXPIRED); + } return Source.REMOVE; }, Priority.DEFAULT); } -- cgit v1.2.3 From 2a3bb3af6fec942c36d20dbf502e8e91bd741bb5 Mon Sep 17 00:00:00 2001 From: Aylur Date: Mon, 7 Oct 2024 18:25:16 +0000 Subject: notifd: add doc comments they are not included in the generated docs or gir yet --- lib/notifd/daemon.vala | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/notifd/daemon.vala') diff --git a/lib/notifd/daemon.vala b/lib/notifd/daemon.vala index b7a76df..d09564c 100644 --- a/lib/notifd/daemon.vala +++ b/lib/notifd/daemon.vala @@ -36,8 +36,12 @@ internal class AstalNotifd.Daemon : Object { public signal void prop_changed(string prop); // emitting an event from proxy doesn't seem to work - public void emit_resolved(uint id, ClosedReason reason) { resolved(id, reason); } - public void emit_action_invoked(uint id, string action) { action_invoked(id, action); } + public void emit_resolved(uint id, ClosedReason reason) throws Error { + resolved(id, reason); + } + public void emit_action_invoked(uint id, string action) throws Error { + action_invoked(id, action); + } construct { cache_directory = Environment.get_user_cache_dir() + "/astal/notifd"; @@ -157,7 +161,9 @@ internal class AstalNotifd.Daemon : Object { private void write_state() { var list = new Json.Builder().begin_array(); foreach (var n in notifications) { - list.add_value(n.to_json()); + if (!n.transient) { + list.add_value(n.to_json()); + } } list.end_array(); -- cgit v1.2.3