From d1ee904dab26725ae4f0be316701b6489494f06e Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Tue, 6 Jul 2021 10:53:30 +0800 Subject: [PATCH] Fix notifications "mark all" not working on Desktop ## Issue 6343 --- ui/redux/actions/notifications.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/redux/actions/notifications.js b/ui/redux/actions/notifications.js index 8d6f57a4f..54c46ea1b 100644 --- a/ui/redux/actions/notifications.js +++ b/ui/redux/actions/notifications.js @@ -124,7 +124,7 @@ export function doReadNotifications(notificationsIds: Array) { } else { // A null or invalid argument will wipe all unread notifications. const getUnreadIds = (list) => list.filter((n) => !n.is_read).map((n) => n.id); - ids = [...new Set([...getUnreadIds(notifications), ...getUnreadIds(notificationsFiltered)])]; + ids = Array.from(new Set([...getUnreadIds(notifications), ...getUnreadIds(notificationsFiltered)])); } dispatch({ type: ACTIONS.NOTIFICATION_READ_STARTED }); @@ -167,7 +167,7 @@ export function doSeeAllNotifications() { } const getUnseenIds = (list) => list.filter((n) => !n.is_seen).map((n) => n.id); - const unseenIds = [...new Set([...getUnseenIds(notifications), ...getUnseenIds(notificationsFiltered)])]; + const unseenIds = Array.from(new Set([...getUnseenIds(notifications), ...getUnseenIds(notificationsFiltered)])); dispatch(doSeeNotifications(unseenIds)); };