Use better notification ID.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 25 May 2011 17:39:52 +0000 (19:39 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 25 May 2011 17:39:52 +0000 (19:39 +0200)
src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java
src/main/java/net/pterodactylus/sone/web/WebInterface.java
src/main/java/net/pterodactylus/sone/web/ajax/GetNotificationAjaxPage.java

index 2362d6a..37cff6f 100644 (file)
@@ -59,7 +59,7 @@ public class ListNotificationFilters {
                                if (filteredNotification != null) {
                                        filteredNotifications.add(filteredNotification);
                                }
-                       } else if (notification.getId().equals("new-replies-notification")) {
+                       } else if (notification.getId().equals("new-reply-notification")) {
                                ListNotification<Reply> filteredNotification = filterNewReplyNotification((ListNotification<Reply>) notification, currentSone);
                                if (filteredNotification != null) {
                                        filteredNotifications.add(filteredNotification);
index 75caba2..e155944 100644 (file)
@@ -224,7 +224,7 @@ public class WebInterface implements CoreListener {
                newPostNotification = new ListNotification<Post>("new-post-notification", "posts", newPostNotificationTemplate, false);
 
                Template newReplyNotificationTemplate = TemplateParser.parse(createReader("/templates/notify/newReplyNotification.html"));
-               newReplyNotification = new ListNotification<Reply>("new-replies-notification", "replies", newReplyNotificationTemplate, false);
+               newReplyNotification = new ListNotification<Reply>("new-reply-notification", "replies", newReplyNotificationTemplate, false);
 
                Template rescuingSonesTemplate = TemplateParser.parse(createReader("/templates/notify/rescuingSonesNotification.html"));
                rescuingSonesNotification = new ListNotification<Sone>("sones-being-rescued-notification", "sones", rescuingSonesTemplate);
index 0472349..1406c3a 100644 (file)
@@ -83,7 +83,7 @@ public class GetNotificationAjaxPage extends JsonPage {
                        Notification notification = webInterface.getNotifications().getNotification(notificationId);
                        if ("new-post-notification".equals(notificationId)) {
                                notification = ListNotificationFilters.filterNewPostNotification((ListNotification<Post>) notification, currentSone);
-                       } else if ("new-replies-notification".equals(notificationId)) {
+                       } else if ("new-reply-notification".equals(notificationId)) {
                                notification = ListNotificationFilters.filterNewReplyNotification((ListNotification<Reply>) notification, currentSone);
                        }
                        if (notification == null) {