From 4d07ddbfd96d610c2f862c4688aed75d3f4ff86f Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 1 Jul 2011 09:13:56 +0200 Subject: [PATCH] Remove remnants of the old Rescue Mode. --- .../net/pterodactylus/sone/core/CoreListener.java | 16 ----------- .../sone/core/CoreListenerManager.java | 26 ------------------ .../net/pterodactylus/sone/web/WebInterface.java | 31 ---------------------- .../notify/rescuingSonesNotification.html | 6 ----- .../templates/notify/sonesRescuedNotification.html | 7 ----- 5 files changed, 86 deletions(-) delete mode 100644 src/main/resources/templates/notify/rescuingSonesNotification.html delete mode 100644 src/main/resources/templates/notify/sonesRescuedNotification.html diff --git a/src/main/java/net/pterodactylus/sone/core/CoreListener.java b/src/main/java/net/pterodactylus/sone/core/CoreListener.java index 0e497e8..d5120ac 100644 --- a/src/main/java/net/pterodactylus/sone/core/CoreListener.java +++ b/src/main/java/net/pterodactylus/sone/core/CoreListener.java @@ -33,22 +33,6 @@ import net.pterodactylus.util.version.Version; public interface CoreListener extends EventListener { /** - * Notifies a listener that a Sone is now being rescued. - * - * @param sone - * The Sone that is rescued - */ - public void rescuingSone(Sone sone); - - /** - * Notifies a listener that the Sone was rescued and can now be unlocked. - * - * @param sone - * The Sone that was rescued - */ - public void rescuedSone(Sone sone); - - /** * Notifies a listener that a new Sone has been discovered. * * @param sone diff --git a/src/main/java/net/pterodactylus/sone/core/CoreListenerManager.java b/src/main/java/net/pterodactylus/sone/core/CoreListenerManager.java index 08f9ef0..875a2b6 100644 --- a/src/main/java/net/pterodactylus/sone/core/CoreListenerManager.java +++ b/src/main/java/net/pterodactylus/sone/core/CoreListenerManager.java @@ -45,32 +45,6 @@ public class CoreListenerManager extends AbstractListenerManager mentionNotification; - /** The “rescuing Sone” notification. */ - private final ListNotification rescuingSonesNotification; - - /** The “Sone rescued” notification. */ - private final ListNotification sonesRescuedNotification; - /** Notifications for sone inserts. */ private final Map soneInsertNotifications = new HashMap(); @@ -258,12 +252,6 @@ public class WebInterface implements CoreListener { Template mentionNotificationTemplate = TemplateParser.parse(createReader("/templates/notify/mentionNotification.html")); mentionNotification = new ListNotification("mention-notification", "posts", mentionNotificationTemplate, false); - Template rescuingSonesTemplate = TemplateParser.parse(createReader("/templates/notify/rescuingSonesNotification.html")); - rescuingSonesNotification = new ListNotification("sones-being-rescued-notification", "sones", rescuingSonesTemplate); - - Template sonesRescuedTemplate = TemplateParser.parse(createReader("/templates/notify/sonesRescuedNotification.html")); - sonesRescuedNotification = new ListNotification("sones-rescued-notification", "sones", sonesRescuedTemplate); - Template lockedSonesTemplate = TemplateParser.parse(createReader("/templates/notify/lockedSonesNotification.html")); lockedSonesNotification = new ListNotification("sones-locked-notification", "sones", lockedSonesTemplate); @@ -739,25 +727,6 @@ public class WebInterface implements CoreListener { * {@inheritDoc} */ @Override - public void rescuingSone(Sone sone) { - rescuingSonesNotification.add(sone); - notificationManager.addNotification(rescuingSonesNotification); - } - - /** - * {@inheritDoc} - */ - @Override - public void rescuedSone(Sone sone) { - rescuingSonesNotification.remove(sone); - sonesRescuedNotification.add(sone); - notificationManager.addNotification(sonesRescuedNotification); - } - - /** - * {@inheritDoc} - */ - @Override public void newSoneFound(Sone sone) { newSoneNotification.add(sone); if (!hasFirstStartNotification()) { diff --git a/src/main/resources/templates/notify/rescuingSonesNotification.html b/src/main/resources/templates/notify/rescuingSonesNotification.html deleted file mode 100644 index eef06ac..0000000 --- a/src/main/resources/templates/notify/rescuingSonesNotification.html +++ /dev/null @@ -1,6 +0,0 @@ -
- <%= Notification.SoneIsBeingRescued.Text|l10n|html> - <%foreach sones sone> - <% sone.niceName|html><%notlast>,<%/notlast><%last>.<%/last> - <%/foreach> -
diff --git a/src/main/resources/templates/notify/sonesRescuedNotification.html b/src/main/resources/templates/notify/sonesRescuedNotification.html deleted file mode 100644 index 84f015d..0000000 --- a/src/main/resources/templates/notify/sonesRescuedNotification.html +++ /dev/null @@ -1,7 +0,0 @@ -
- <%= Notification.SoneRescued.Text|l10n|html> - <%foreach sones sone> - <% sone.niceName|html><%notlast>,<%/notlast><%last>.<%/last> - <%/foreach> - <%= Notification.SoneRescued.Text.RememberToUnlock|l10n|html> -
-- 2.7.4