X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FWebInterface.java;h=50c63ee3b8f390cbcca8cfea675e6c9cb0a45651;hb=4cdc52febe9b6f3a499da08805a1b03bcc1be852;hp=8e21ea5b735bc8cf38696b24f83c2e7402fa9f15;hpb=5cfe9916e6b52b68a403873e35683ce242be4793;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 8e21ea5..50c63ee 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -27,9 +27,6 @@ import java.util.Map; import java.util.Set; import java.util.TimeZone; import java.util.UUID; -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; import java.util.logging.Logger; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -173,9 +170,6 @@ public class WebInterface implements SessionProvider { /** Notifications for sone inserts. */ private final Map soneInsertNotifications = new HashMap<>(); - /** Scheduled executor for time-based notifications. */ - private final ScheduledExecutorService ticker = Executors.newScheduledThreadPool(1); - @Inject public WebInterface(SonePlugin sonePlugin, Loaders loaders, ListNotificationFilter listNotificationFilter, PostVisibilityFilter postVisibilityFilter, ReplyVisibilityFilter replyVisibilityFilter, @@ -409,23 +403,6 @@ public class WebInterface implements SessionProvider { */ public void start() { registerToadlets(); - - /* notification templates. */ - Template wotMissingNotificationTemplate = loaders.loadTemplate("/templates/notify/wotMissingNotification.html"); - final TemplateNotification wotMissingNotification = new TemplateNotification("wot-missing-notification", wotMissingNotificationTemplate); - ticker.scheduleAtFixedRate(new Runnable() { - - @Override - @SuppressWarnings("synthetic-access") - public void run() { - if (getCore().getIdentityManager().isConnected()) { - wotMissingNotification.dismiss(); - } else { - notificationManager.addNotification(wotMissingNotification); - } - } - - }, 15, 15, TimeUnit.SECONDS); } /** @@ -433,7 +410,6 @@ public class WebInterface implements SessionProvider { */ public void stop() { pageToadletRegistry.unregisterToadlets(); - ticker.shutdownNow(); } //