From d42dbcdfdae0ac15567f4c790be78a26bbbff1a6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 1 Jul 2011 14:30:42 +0200 Subject: [PATCH] Filter mention notifications separately. --- .../net/pterodactylus/sone/notify/ListNotificationFilters.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java b/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java index 908ea2b..52f85ba 100644 --- a/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java +++ b/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java @@ -54,7 +54,7 @@ public class ListNotificationFilters { public static List filterNotifications(Collection notifications, Sone currentSone) { List filteredNotifications = new ArrayList(); for (Notification notification : notifications) { - if (notification.getId().equals("new-post-notification") || notification.getId().equals("mention-notification")) { + if (notification.getId().equals("new-post-notification")) { ListNotification filteredNotification = filterNewPostNotification((ListNotification) notification, currentSone); if (filteredNotification != null) { filteredNotifications.add(filteredNotification); @@ -64,6 +64,11 @@ public class ListNotificationFilters { if (filteredNotification != null) { filteredNotifications.add(filteredNotification); } + } else if (notification.getId().equals("mention-notification")) { + ListNotification filteredNotification = filterNewPostNotification((ListNotification) notification, null); + if (filteredNotification != null) { + filteredNotifications.add(filteredNotification); + } } else { filteredNotifications.add(notification); } -- 2.7.4