Readablify unreadAnnouncementCount
This commit is contained in:
parent
d6dd394cd9
commit
eac0008002
@ -31,9 +31,8 @@ export const getters = {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
return state.announcements.reduce((acc, cur) => {
|
const unread = state.announcements.filter(announcement => !(announcement.inactive || announcement.read))
|
||||||
return (!cur.inactive && !cur.read) ? acc + 1 : acc
|
return unread.length
|
||||||
}, 0)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user