X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FWebInterface.java;h=dc573cad25eb077b5c9e6b5f279bd6c048e7ab6e;hb=4971f9e74fd42dada71d1c87e641263d1461608d;hp=76a18f9ac5dc9504fcf3964695a2a3f5fa8af40a;hpb=636395f003374b2ce296d96c65a8250bc3ea6abc;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 76a18f9..dc573ca 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -255,7 +255,7 @@ public class WebInterface implements CoreListener { */ public void setFirstStart(boolean firstStart) { if (firstStart) { - Template firstStartNotificationTemplate = new Template(createReader("/templates/notify/firstStartNotification.html")); + Template firstStartNotificationTemplate = templateFactory.createTemplate(createReader("/templates/notify/firstStartNotification.html")); Notification firstStartNotification = new TemplateNotification("first-start-notification", firstStartNotificationTemplate); notificationManager.addNotification(firstStartNotification); } @@ -269,8 +269,8 @@ public class WebInterface implements CoreListener { * {@code false} if the existing configuration could be read */ public void setNewConfig(boolean newConfig) { - if (newConfig && hasFirstStartNotification()) { - Template configNotReadNotificationTemplate = new Template(createReader("/templates/notify/configNotReadNotification.html")); + if (newConfig && !hasFirstStartNotification()) { + Template configNotReadNotificationTemplate = templateFactory.createTemplate(createReader("/templates/notify/configNotReadNotification.html")); Notification configNotReadNotification = new TemplateNotification("config-not-read-notification", configNotReadNotificationTemplate); notificationManager.addNotification(configNotReadNotification); }