X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FWebInterface.java;h=5865f1d6052b0520fa0fc6a5f033371f66601cb8;hb=a7289fbfa428ebc9c1facb48be08587feb0ee489;hp=0e7905db71e4663e23777c6e51ca9d61778f7c89;hpb=03b402bcc630ed09db52f9c16ec9950e01255a71;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 0e7905d..5865f1d 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -261,6 +261,21 @@ public class WebInterface implements CoreListener { } } + /** + * Sets whether Sone was started with a fresh configuration file. + * + * @param newConfig + * {@code true} if Sone was started with a fresh configuration, + * {@code false} if the existing configuration could be read + */ + public void setNewConfig(boolean newConfig) { + if (newConfig && (notificationManager.getNotification("first-start-notification") == null)) { + Template configNotReadNotificationTemplate = new Template(createReader("/templates/notify/configNotReadNotification.html")); + Notification configNotReadNotification = new TemplateNotification("config-not-read-notification", configNotReadNotificationTemplate); + notificationManager.addNotification(configNotReadNotification); + } + } + // // ACTIONS //