aboutsummaryrefslogtreecommitdiff
path: root/src/services/notification_utils/notification_utils.js
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2020-01-28 20:44:13 +0200
committerHenry Jameson <me@hjkos.com>2020-01-28 20:44:13 +0200
commitf0c4bb1193f71cb93546be7e8f41236c4c192f85 (patch)
tree26c35a98a8aa80279a1d8d938e41629a774fda37 /src/services/notification_utils/notification_utils.js
parentb63e679a31a573c30868477f17322d6ed040af58 (diff)
parentc54111797ae1058e59931b2d1f12e6ab6a6f96a9 (diff)
Merge remote-tracking branch 'upstream/develop' into themes-accent
* upstream/develop: (33 commits) add emoji reactions to changelog fix emoji reaction classes broken in develop review changes Fix password and email update remove unnecessary anonymous function Apply suggestion to src/services/api/api.service.js remove logs/commented code remove favs count from react button remove mock data change emoji reactions to use new format Added polyfills for EventTarget (needed for Safari) and CustomEvent (needed for IE) Fix missing TWKN when logged in, but server is set to private mode. Fix follower request fetching Add domain mutes to changelog Implement domain mutes v2 change changelog to reflect actual release history of frontend Fix #750 , fix error messages and captcha resetting Optimize Notifications Rendering update CHANGELOG Use last seen notif instead of first unseen notif for sinceId ...
Diffstat (limited to 'src/services/notification_utils/notification_utils.js')
-rw-r--r--src/services/notification_utils/notification_utils.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/services/notification_utils/notification_utils.js b/src/services/notification_utils/notification_utils.js
index 7021adbd..860620fc 100644
--- a/src/services/notification_utils/notification_utils.js
+++ b/src/services/notification_utils/notification_utils.js
@@ -6,7 +6,8 @@ export const visibleTypes = store => ([
store.state.config.notificationVisibility.likes && 'like',
store.state.config.notificationVisibility.mentions && 'mention',
store.state.config.notificationVisibility.repeats && 'repeat',
- store.state.config.notificationVisibility.follows && 'follow'
+ store.state.config.notificationVisibility.follows && 'follow',
+ store.state.config.notificationVisibility.moves && 'move'
].filter(_ => _))
const sortById = (a, b) => {
@@ -25,7 +26,7 @@ const sortById = (a, b) => {
}
}
-export const visibleNotificationsFromStore = (store, types) => {
+export const filteredNotificationsFromStore = (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')
@@ -35,4 +36,4 @@ export const visibleNotificationsFromStore = (store, types) => {
}
export const unseenNotificationsFromStore = store =>
- filter(visibleNotificationsFromStore(store), ({ seen }) => !seen)
+ filter(filteredNotificationsFromStore(store), ({ seen }) => !seen)