From 6df7ea3692aa7c914e1b65306568d4e64eea9317 Mon Sep 17 00:00:00 2001 From: David Luhmer Date: Thu, 30 Dec 2021 15:49:02 +0100 Subject: [PATCH] filter "none" notification channel - fix #1046 --- .../owncloudnewsreader/database/DatabaseConnectionOrm.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/database/DatabaseConnectionOrm.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/database/DatabaseConnectionOrm.java index e89755d16..0a92cb29c 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/database/DatabaseConnectionOrm.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/database/DatabaseConnectionOrm.java @@ -339,7 +339,11 @@ public LazyList getAllUnreadRssItemsForWidget() { public Set getNotificationGroups() { List feeds = daoSession.getFeedDao().loadAll(); - String[] notificationChannelsGroups = feeds.stream().map(Feed::getNotificationChannel).toArray(String[]::new); + String[] notificationChannelsGroups = feeds + .stream() + .map(Feed::getNotificationChannel) + .filter(nc -> !nc.equals("none")) + .toArray(String[]::new); return new HashSet<>(Arrays.asList(notificationChannelsGroups)); }