Skip to content

Commit 5a21309

Browse files
committed
ensure all notifications are deleted
1 parent 974c586 commit 5a21309

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

files/usr/share/cinnamon/applets/[email protected]/applet.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,14 @@ class Notifications {
235235
this._appGroupList.forEach(appGroup => {
236236
if (!appGroup.groupState || appGroup.groupState.willUnmount) return;
237237
if (appId === appGroup.groupState.appId) {
238-
appGroup.notifications.forEach(notification => {
239-
if (!notification._destroyed) {
240-
notification.destroy(NotificationDestroyedReason.DISMISSED);
238+
let i = 0;
239+
while (appGroup.notifications[i]) {
240+
if (!appGroup.notifications[i]._destroyed) {
241+
appGroup.notifications[i].destroy(NotificationDestroyedReason.DISMISSED);
242+
} else {
243+
i++;
241244
}
242-
});
245+
}
243246
appGroup.notifications = [];
244247
this.updateNotificationsBadge(appGroup);
245248
}

0 commit comments

Comments
 (0)