Let the list notification dismiss itself automatically when it’s empty.
[Sone.git] / src / main / java / net / pterodactylus / sone / notify / ListNotification.java
index 64c2ecb..423bea4 100644 (file)
@@ -84,6 +84,9 @@ public class ListNotification<T> extends TemplateNotification {
         */
        public void remove(T element) {
                elements.remove(element);
+               if (elements.isEmpty()) {
+                       dismiss();
+               }
                touch();
        }