From 3fab4c470b012acc3e6c5d79d9fd5a5dcf7c2b96 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Thu, 12 Oct 2017 18:29:04 +0200 Subject: [PATCH] Increment id counter only for displayed notifications Previously for every notification (also stacked ones), a new notification id was used, even if the notification got discarded. --- src/queues.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/queues.c b/src/queues.c index 30b727d..2070bbb 100644 --- a/src/queues.c +++ b/src/queues.c @@ -35,8 +35,6 @@ int queues_notification_insert(notification *n, int replaces_id) { if (replaces_id == 0) { - n->id = ++next_notification_id; - if (settings.stack_duplicates) { int stacked = queues_stack_duplicate(n); if (stacked > 0) { @@ -45,6 +43,8 @@ int queues_notification_insert(notification *n, int replaces_id) } } + n->id = ++next_notification_id; + g_queue_insert_sorted(queue, n, notification_cmp_data, NULL); } else {