From c29cae922c2c28e98d0c2d8cadb3c7de62fcb26b Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 9 Feb 2013 03:01:13 +0100 Subject: [PATCH] Remove all elements from a notification. --- src/main/java/net/pterodactylus/sone/notify/ListNotification.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/notify/ListNotification.java b/src/main/java/net/pterodactylus/sone/notify/ListNotification.java index d99424c..9d1203b 100644 --- a/src/main/java/net/pterodactylus/sone/notify/ListNotification.java +++ b/src/main/java/net/pterodactylus/sone/notify/ListNotification.java @@ -141,7 +141,9 @@ public class ListNotification extends TemplateNotification { * The element to remove */ public void remove(T element) { - elements.remove(element); + while (elements.remove(element)) { + /* do nothing, just remove all instances of the element. */ + } if (elements.isEmpty()) { dismiss(); } -- 2.7.4