move id replace before stack_duplicates logic
This commit is contained in:
parent
f48d512223
commit
788bd964d7
@ -313,6 +313,14 @@ int notification_init(notification * n, int id)
|
||||
|
||||
n->msg = g_strstrip(n->msg);
|
||||
|
||||
if (id == 0) {
|
||||
n->id = ++next_notification_id;
|
||||
} else {
|
||||
notification_close_by_id(id, -1);
|
||||
n->id = id;
|
||||
|
||||
}
|
||||
|
||||
n->dup_count = 0;
|
||||
|
||||
/* check if n is a duplicate */
|
||||
@ -402,13 +410,6 @@ int notification_init(notification * n, int id)
|
||||
|
||||
n->first_render = true;
|
||||
|
||||
if (id == 0) {
|
||||
n->id = ++next_notification_id;
|
||||
} else {
|
||||
notification_close_by_id(id, -1);
|
||||
n->id = id;
|
||||
}
|
||||
|
||||
if (strlen(n->msg) == 0) {
|
||||
notification_close(n, 2);
|
||||
printf("skipping notification: %s %s\n", n->body, n->summary);
|
||||
|
Loading…
x
Reference in New Issue
Block a user