Skip to content

Commit 7761228

Browse files
committed
lib: notifd check for valid replace ids
1 parent 6986693 commit 7761228

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/notifd/daemon.vala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@ internal class AstalNotifd.Daemon : Object {
124124
hints.remove("image_data");
125125
hints.remove("icon_data");
126126

127-
var id = replaces_id > 0 ? replaces_id : n_id++;
127+
var id = notifs.contains(replaces_id) ? replaces_id : n_id++;
128128

129+
// TODO: update existing Notification object when replaced
129130
var replaced = add_notification(new Notification(
130131
app_name, id, app_icon, summary, body, actions, hints, expire_timeout
131132
));

0 commit comments

Comments
 (0)