Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change notification sorting to show most recent at the top #8595

Merged
merged 1 commit into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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