Fixed replacing notification in panel

This commit is contained in:
Erik Reider
2021-07-27 22:15:38 +02:00
parent f3d0937c91
commit 0e8f158e3c

View File

@@ -104,16 +104,16 @@ namespace SwayNotificatonCenter {
hints, hints,
expire_timeout); expire_timeout);
if (!dbusInit.ccDaemon.get_visibility ()) { if (id == replaces_id) {
if (id == replaces_id) { notiWin.replace_notification (param);
notiWin.replace_notification (param); foreach (NotifyParams n in dbusInit.notifications) {
foreach (NotifyParams n in dbusInit.notifications) { if (n.applied_id == replaces_id) {
if (n.applied_id == replaces_id) { dbusInit.notifications.remove (n);
dbusInit.notifications.remove (n); break;
break;
}
} }
} }
}
if (!dbusInit.ccDaemon.get_visibility ()) {
notiWin.add_notification (param); notiWin.add_notification (param);
} }
dbusInit.notifications.append (param); dbusInit.notifications.append (param);