Free old notifications when replaced

Do not push old notifications to history, as there would be multiple
notifications around with the same ID.
This commit is contained in:
Benedikt Heine 2017-11-15 14:22:52 +01:00
parent 1162f53f8c
commit 03c8301c26

View File

@ -161,7 +161,7 @@ bool queues_notification_replace_id(notification *new)
new->start = g_get_monotonic_time();
new->dup_count = old->dup_count;
notification_run_script(new);
queues_history_push(old);
notification_free(old);
return true;
}
}
@ -173,7 +173,7 @@ bool queues_notification_replace_id(notification *new)
if (old->id == new->id) {
iter->data = new;
new->dup_count = old->dup_count;
queues_history_push(old);
notification_free(old);
return true;
}
}