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.
This commit is contained in:
Benedikt Heine 2017-10-12 18:29:04 +02:00
parent f869175d0d
commit 3fab4c470b

View File

@ -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 {