X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FWebInterface.java;h=76a18f9ac5dc9504fcf3964695a2a3f5fa8af40a;hb=636395f003374b2ce296d96c65a8250bc3ea6abc;hp=5e3756d21e65fa463b3aeaff18852201a0e0bcd5;hpb=40ef1d6811ccccb8e1c559ee3747f0f4405297c7;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 5e3756d..76a18f9 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -269,7 +269,7 @@ public class WebInterface implements CoreListener { * {@code false} if the existing configuration could be read */ public void setNewConfig(boolean newConfig) { - if (newConfig && (notificationManager.getNotification("first-start-notification") == null)) { + if (newConfig && hasFirstStartNotification()) { Template configNotReadNotificationTemplate = new Template(createReader("/templates/notify/configNotReadNotification.html")); Notification configNotReadNotification = new TemplateNotification("config-not-read-notification", configNotReadNotificationTemplate); notificationManager.addNotification(configNotReadNotification); @@ -488,7 +488,9 @@ public class WebInterface implements CoreListener { @Override public void newSoneFound(Sone sone) { newSoneNotification.add(sone); - notificationManager.addNotification(newSoneNotification); + if (!hasFirstStartNotification()) { + notificationManager.addNotification(newSoneNotification); + } } /** @@ -497,7 +499,9 @@ public class WebInterface implements CoreListener { @Override public void newPostFound(Post post) { newPostNotification.add(post); - notificationManager.addNotification(newPostNotification); + if (!hasFirstStartNotification()) { + notificationManager.addNotification(newPostNotification); + } } /** @@ -509,7 +513,9 @@ public class WebInterface implements CoreListener { return; } newReplyNotification.add(reply); - notificationManager.addNotification(newReplyNotification); + if (!hasFirstStartNotification()) { + notificationManager.addNotification(newReplyNotification); + } } /**