stream-meteor icon indicating copy to clipboard operation
stream-meteor copied to clipboard

Stream.feedManager.getNotificationFeedStats() isn't reactive.

Open albertkai opened this issue 9 years ago • 3 comments

Notification subscription works perfect, but the stats doesn't get updated reactively.. Only after reloading the page it shows actual numbers. When I explicitly execute Stream.notifications.findOne({ feedGroup: 'notification', feedId: Meteor.userId()}) in the console, after performing some action, the returned numbers aren't updated, but the notification itself is successfully received and displayed

albertkai avatar Oct 01 '16 10:10 albertkai

I use server client to add notifications..

albertkai avatar Oct 01 '16 10:10 albertkai

Unfortunately this behavior has been removed from the Stream realtime transport (it received a major refactor a while back). This means the realtime transport no longer exposes the amount of unread and unseen activities, something the meteor library currently relies on to make these counters reactive.

matthisk avatar Oct 05 '16 13:10 matthisk

I use temporary workaround - copy the counts in a reactive variable on first load, and use observeChanges on used Stream collections to increment that on added. maybe that will help somebody:)

albertkai avatar Oct 05 '16 14:10 albertkai