diff --git a/aleksis/core/frontend/components/notifications/NotificationList.vue b/aleksis/core/frontend/components/notifications/NotificationList.vue index 1c51c00661816fe3e244e6d511a0e70c747dbca6..08914210eefc7ecd2f52ea24342abf1d1467e5c9 100644 --- a/aleksis/core/frontend/components/notifications/NotificationList.vue +++ b/aleksis/core/frontend/components/notifications/NotificationList.vue @@ -20,7 +20,7 @@ v-if=" myNotifications && myNotifications.person && - myNotifications.person.unreadNotificationsCount > 0 + myNotifications.person.notifications.length > 0 " > mdi-bell-badge-outline @@ -38,7 +38,7 @@ v-if=" myNotifications.person && myNotifications.person.notifications && - myNotifications.person.notifications.length + unreadNotifications.length " > <v-subheader>{{ $t("notifications.notifications") }}</v-subheader> @@ -86,5 +86,10 @@ export default { pollInterval: 30000, }, }, + computed: { + unreadNotifications() { + return this.myNotifications.filter(n => !n.read); + }, + }, }; </script> diff --git a/aleksis/core/frontend/components/notifications/myNotifications.graphql b/aleksis/core/frontend/components/notifications/myNotifications.graphql index b8287ea2f50664f556d82bdb58e4b508c7ece1d4..89e91562086607e6c9e7649fa1295d234d189bd3 100644 --- a/aleksis/core/frontend/components/notifications/myNotifications.graphql +++ b/aleksis/core/frontend/components/notifications/myNotifications.graphql @@ -1,7 +1,6 @@ { myNotifications: whoAmI { person { - unreadNotificationsCount notifications { id title