Skip to content
Snippets Groups Projects
Commit b851c1d1 authored by Hangzhi Yu's avatar Hangzhi Yu Committed by magicfelix
Browse files

Remove unreadNotificationsCount from notifications query

parent 2385a348
No related branches found
No related tags found
1 merge request!1255Resolve "unreadNotificationsCount is queried when accessing notifications even though there is no need for it"
......@@ -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>
{
myNotifications: whoAmI {
person {
unreadNotificationsCount
notifications {
id
title
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment