From: David ‘Bombe’ Roden Date: Fri, 1 Jul 2011 12:30:42 +0000 (+0200) Subject: Filter mention notifications separately. X-Git-Tag: 0.6.6^2~29 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=d42dbcdfdae0ac15567f4c790be78a26bbbff1a6 Filter mention notifications separately. --- 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); }