From: David ‘Bombe’ Roden Date: Sat, 9 Feb 2013 02:01:13 +0000 (+0100) Subject: Remove all elements from a notification. X-Git-Tag: 0.8.5^2~3^2~15 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=c29cae922c2c28e98d0c2d8cadb3c7de62fcb26b Remove all elements from a notification. --- 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(); }