mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
@mattwr18 vue-apollo rocks! Taking the time to study the docs is a rewarding investment. My first idea was to cache the `unreadNotificationsCount` with Vuex. But the docs of apollo even suggest to use apollo's local state as a complete replacement of Vuex: https://vue-apollo.netlify.com/guide/local-state.html Then I further investigated why the updated `NOTIFIED` objects won't update the notification counter. Turns out: They don't have an ID and the computed property didn't fire when the notifications array would change. I fixed both in this commit and yes, it works as expected. No additional code required 💪