Don’t call touch() when setting all elements at once.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 14 Apr 2011 17:59:56 +0000 (19:59 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 14 Apr 2011 17:59:56 +0000 (19:59 +0200)
src/main/java/net/pterodactylus/sone/notify/ListNotification.java

index c66d376..3a79c93 100644 (file)
@@ -101,7 +101,8 @@ public class ListNotification<T> extends TemplateNotification {
        }
 
        /**
        }
 
        /**
-        * Sets the elements to show in this notification.
+        * Sets the elements to show in this notification. This method will not call
+        * {@link #touch()}.
         *
         * @param elements
         *            The elements to show
         *
         * @param elements
         *            The elements to show
@@ -109,7 +110,6 @@ public class ListNotification<T> extends TemplateNotification {
        public void setElements(Collection<? extends T> elements) {
                this.elements.clear();
                this.elements.addAll(elements);
        public void setElements(Collection<? extends T> elements) {
                this.elements.clear();
                this.elements.addAll(elements);
-               touch();
        }
 
        /**
        }
 
        /**