This repository was archived by the owner on May 19, 2025. It is now read-only.

Description
What's the equivalent of listening to multiple documents in a collection using the realtime-listener service?
I have a news-feed component where I'm trying to watch for new activities. Here's my activities computed property:
activities: computed('company', function() {
return this.get('store').query('activity', {
query: (ref) => ref.where(`company`, '==', this.get('company.id')).orderBy('createdAt', 'desc');
});
})
That's fetching correctly current activities, but it's not updated live. How do I achieve that? I've tried the following:
this.get('realtime').subscribe(this, this.get('activities'));
It's obviously not working as the second parameter has to be a record, not an array.