Update notification attributes upon direct replace

This commit is contained in:
Benedikt Heine 2017-10-06 13:31:26 +02:00
parent 1533fcd782
commit e8f152b5d0

View File

@ -623,6 +623,9 @@ bool notification_replace_by_id(notification *new)
notification *old = iter->data; notification *old = iter->data;
if (old->id == new->id) { if (old->id == new->id) {
iter->data = new; iter->data = new;
new->start = time(NULL);
new->dup_count = old->dup_count;
notification_run_script(new);
history_push(old); history_push(old);
return true; return true;
} }
@ -634,6 +637,7 @@ bool notification_replace_by_id(notification *new)
notification *old = iter->data; notification *old = iter->data;
if (old->id == new->id) { if (old->id == new->id) {
iter->data = new; iter->data = new;
new->dup_count = old->dup_count;
history_push(old); history_push(old);
return true; return true;
} }