From: David ‘Bombe’ Roden Date: Sun, 12 Dec 2010 14:01:33 +0000 (+0100) Subject: Use template factory to create templates. X-Git-Tag: beta-freefall-0.6.2-1~197^2 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=4971f9e74fd42dada71d1c87e641263d1461608d;p=Sone.git Use template factory to create templates. --- diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 4497019..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); } @@ -270,7 +270,7 @@ public class WebInterface implements CoreListener { */ public void setNewConfig(boolean newConfig) { if (newConfig && !hasFirstStartNotification()) { - Template configNotReadNotificationTemplate = new Template(createReader("/templates/notify/configNotReadNotification.html")); + Template configNotReadNotificationTemplate = templateFactory.createTemplate(createReader("/templates/notify/configNotReadNotification.html")); Notification configNotReadNotification = new TemplateNotification("config-not-read-notification", configNotReadNotificationTemplate); notificationManager.addNotification(configNotReadNotification); }