X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FWebInterface.java;fp=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FWebInterface.java;h=b4c5942c684288997b522094ad329074405ef4ef;hp=eaa60190b16b7b777f07429a376541cc786b7146;hb=b2952fda6d34528489d7fa4e26e09133099c978f;hpb=8b6cad7628a282f6092113ba461f482e2cac82f4 diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index eaa6019..b4c5942 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -179,9 +179,6 @@ public class WebInterface implements SessionProvider { /** Sone locked notification ticker objects. */ private final Map> lockedSonesTickerObjects = Collections.synchronizedMap(new HashMap>()); - /** The “Sone locked” notification. */ - private final ListNotification lockedSonesNotification; - /** The “new version” notification. */ private final TemplateNotification newVersionNotification; @@ -244,9 +241,6 @@ public class WebInterface implements SessionProvider { Template mentionNotificationTemplate = loaders.loadTemplate("/templates/notify/mentionNotification.html"); mentionNotification = new ListNotification<>("mention-notification", "posts", mentionNotificationTemplate, false); - Template lockedSonesTemplate = loaders.loadTemplate("/templates/notify/lockedSonesNotification.html"); - lockedSonesNotification = new ListNotification<>("sones-locked-notification", "sones", lockedSonesTemplate); - Template newVersionTemplate = loaders.loadTemplate("/templates/notify/newVersionNotification.html"); newVersionNotification = new TemplateNotification("new-version-notification", newVersionTemplate); @@ -759,39 +753,6 @@ public class WebInterface implements SessionProvider { } /** - * Notifies the web interface that a Sone was locked. - * - * @param soneLockedEvent - * The event - */ - @Subscribe - public void soneLocked(SoneLockedEvent soneLockedEvent) { - final Sone sone = soneLockedEvent.getSone(); - ScheduledFuture tickerObject = ticker.schedule(new Runnable() { - - @Override - @SuppressWarnings("synthetic-access") - public void run() { - lockedSonesNotification.add(sone); - notificationManager.addNotification(lockedSonesNotification); - } - }, 5, TimeUnit.MINUTES); - lockedSonesTickerObjects.put(sone, tickerObject); - } - - /** - * Notifies the web interface that a Sone was unlocked. - * - * @param soneUnlockedEvent - * The event - */ - @Subscribe - public void soneUnlocked(SoneUnlockedEvent soneUnlockedEvent) { - lockedSonesNotification.remove(soneUnlockedEvent.getSone()); - lockedSonesTickerObjects.remove(soneUnlockedEvent.getSone()).cancel(false); - } - - /** * Notifies the web interface that a {@link Sone} is being inserted. * * @param soneInsertingEvent