diff --git a/src/notification.c b/src/notification.c index 2b34e10..0733129 100644 --- a/src/notification.c +++ b/src/notification.c @@ -316,6 +316,15 @@ int notification_init(notification *n, int id) rule_apply_all(n); + if (n->icon != NULL && strlen(n->icon) <= 0) { + g_free(n->icon); + n->icon = NULL; + } + + if (n->raw_icon == NULL && n->icon == NULL) { + n->icon = g_strdup(settings.icons[n->urgency]); + } + n->urls = notification_extract_markup_urls(&(n->body)); n->msg = string_replace_all("\\n", "\n", g_strdup(n->format)); @@ -416,15 +425,6 @@ int notification_init(notification *n, int id) n->msg = buffer; } - if (n->icon != NULL && strlen(n->icon) <= 0) { - g_free(n->icon); - n->icon = NULL; - } - - if (n->raw_icon == NULL && n->icon == NULL) { - n->icon = g_strdup(settings.icons[n->urgency]); - } - if (id == 0) { n->id = ++next_notification_id; } else {