projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
🐛 Deduplicate items added to list notification
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
notify
/
ListNotification.java
diff --git
a/src/main/java/net/pterodactylus/sone/notify/ListNotification.java
b/src/main/java/net/pterodactylus/sone/notify/ListNotification.java
index
6a7b086
..
0c9e504
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/notify/ListNotification.java
+++ b/
src/main/java/net/pterodactylus/sone/notify/ListNotification.java
@@
-129,8
+129,10
@@
public class ListNotification<T> extends TemplateNotification {
* The new element
*/
public void add(T element) {
- elements.add(element);
- touch();
+ if (!elements.contains(element)) {
+ elements.add(element);
+ touch();
+ }
}
/**