- if (notification.getId().equals("new-post-notification")) {
- ListNotification<Post> filteredNotification = filterNewPostNotification((ListNotification<Post>) notification, currentSone);
+ if (notification.getId().equals("new-sone-notification")) {
+ if ((currentSone != null) && (!currentSone.getOptions().getBooleanOption("ShowNotification/NewSones").get())) {
+ continue;
+ }
+ filteredNotifications.add(notification);
+ } else if (notification.getId().equals("new-post-notification")) {
+ if ((currentSone != null) && (!currentSone.getOptions().getBooleanOption("ShowNotification/NewPosts").get())) {
+ continue;
+ }
+ ListNotification<Post> filteredNotification = filterNewPostNotification((ListNotification<Post>) notification, currentSone, true);
+ if (filteredNotification != null) {
+ filteredNotifications.add(filteredNotification);
+ }
+ } else if (notification.getId().equals("new-reply-notification")) {
+ if ((currentSone != null) && (!currentSone.getOptions().getBooleanOption("ShowNotification/NewReplies").get())) {
+ continue;
+ }
+ ListNotification<PostReply> filteredNotification = filterNewReplyNotification((ListNotification<PostReply>) notification, currentSone);