From 543604fd2d107d3c6b7123e5713ac923eb76f23c Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 14 May 2019 22:38:16 +0300 Subject: removed unused masto api, added initial version of interactions timeline --- src/services/notification_utils/notification_utils.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/services/notification_utils/notification_utils.js') diff --git a/src/services/notification_utils/notification_utils.js b/src/services/notification_utils/notification_utils.js index 8afd114e..f9cbbade 100644 --- a/src/services/notification_utils/notification_utils.js +++ b/src/services/notification_utils/notification_utils.js @@ -25,11 +25,13 @@ const sortById = (a, b) => { } } -export const visibleNotificationsFromStore = store => { +export const visibleNotificationsFromStore = (store, types) => { // map is just to clone the array since sort mutates it and it causes some issues let sortedNotifications = notificationsFromStore(store).map(_ => _).sort(sortById) sortedNotifications = sortBy(sortedNotifications, 'seen') - return sortedNotifications.filter((notification) => visibleTypes(store).includes(notification.type)) + return sortedNotifications.filter( + (notification) => (types || visibleTypes(store)).includes(notification.type) + ) } export const unseenNotificationsFromStore = store => -- cgit v1.2.3-70-g09d2