Skip to content

Commit

Permalink
Merge pull request #8595 from owncloud/sort-notifications
Browse files Browse the repository at this point in the history
Change notification sorting to show most recent at the top
  • Loading branch information
kulmann authored Mar 13, 2023
2 parents f1e81a7 + 57f10dc commit 28e8427
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions changelog/unreleased/enhancement-notification-bell
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Enhancement: Rework notifications
Enhancement: Rework notification bell

We're now showing the notification bell based on whether the server supports notifications. Previously it was hidden when there were no notifications.
We've added a badge that displays the amount of new notifications.

https://github.com/owncloud/web/pull/8450
https://github.com/owncloud/web/pull/8454
https://github.com/owncloud/web/issues/8452
https://github.com/owncloud/web/issues/8452
2 changes: 2 additions & 0 deletions changelog/unreleased/enhancement-notifications-ocis
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ Notifications now work when running oCIS as backend.

https://github.com/owncloud/web/pull/8518
https://github.com/owncloud/web/pull/8582
https://github.com/owncloud/web/pull/8595
https://github.com/owncloud/web/issues/8519
https://github.com/owncloud/web/issues/8520
https://github.com/owncloud/web/issues/8593
3 changes: 2 additions & 1 deletion packages/web-runtime/src/components/Topbar/Notifications.vue
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ export default {
const {
ocs: { data = [] }
} = yield response.json()
notifications.value = data || []
notifications.value =
data?.sort((a, b) => (new Date(b.datetime) as any) - (new Date(a.datetime) as any)) || []
} catch (e) {
console.error(e)
} finally {
Expand Down

0 comments on commit 28e8427

Please sign in to comment.