diff options
| author | Henry Jameson <me@hjkos.com> | 2019-01-11 03:38:23 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2019-01-11 03:38:23 +0300 |
| commit | b18e27c6d4d2b3d681be8dd81dafcdfeaf20fb35 (patch) | |
| tree | 7ed2f8c40a641941c048f4e4bc7ddf592c8fe4ef /src | |
| parent | 48e811e6edc774affa3526e7a25df6bb07597c9d (diff) | |
fix tests, removed one unused function, fix real problem that tests helped to
surface
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules/statuses.js | 4 | ||||
| -rw-r--r-- | src/services/notification_utils/notification_utils.js | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 05626a02..a931fd97 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -100,10 +100,6 @@ export const statusType = (status) => { return 'unknown' } -export const findMaxId = (...args) => { - return (maxBy(flatten(args), 'id') || {}).id -} - const mergeOrAdd = (arr, obj, item) => { // For sequential IDs BE passes numbers as numbers, we want them as strings. item.id = String(item.id) diff --git a/src/services/notification_utils/notification_utils.js b/src/services/notification_utils/notification_utils.js index c6782af4..c3879677 100644 --- a/src/services/notification_utils/notification_utils.js +++ b/src/services/notification_utils/notification_utils.js @@ -11,7 +11,7 @@ export const visibleTypes = store => ([ export const visibleNotificationsFromStore = store => { // map is just to clone the array since sort mutates it and it causes some issues - let sortedNotifications = notificationsFromStore(store).map(_ => _).sort((a, b) => a.id > b.id ? -1 : 1) + let sortedNotifications = notificationsFromStore(store).map(_ => _).sort((a, b) => a.action.id > b.action.id ? -1 : 1) sortedNotifications = sortBy(sortedNotifications, 'seen') return sortedNotifications.filter((notification) => visibleTypes(store).includes(notification.type)) } |
