-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't use realtime-listener
on 2 attributes
#576
Comments
Alternatively, I understand that relationships are not in realtime. Is there a trick to have them synced as well? |
@jamesdaniels now that Google IO is over, maybe you can help me with this one. It's a real pain right now to use emberfire. |
Yeah, I'll be back on this now that I/O is wrapped. |
Any news @jamesdaniels ? |
Looking at this code it seems that you can only use one listener per
the code is replacing the previous listener, b/c it's the same "route object" (it's the same I'm thinking that maybe a hackish way could be to wrap |
@jamesdaniels Please help us with emberfire. We need this feature. |
@jamesdaniels 🙏 it's been so long! |
I worked through this problem, by updating the RealtimeRoute Mixin UpdateThis update to the mixin creates a subscriptionId for and from each model. It supports using RSVP.hash to manage multiple queries in a route's model. Each model in the RSVP.hash is subscribed to, and unsubscribed from, realtime updates during the route's lifecycle. The mixin also serves as an example for managing subscriptions from a component if preferred. The subscriptionId is generated in the mixin since the model may be destoryed before an unsubscribe is complete. This Mixin requires the update to the realtime-listner shown in the next section.
RealtimeListener Service Update
|
@iofusion Can you get this merged? |
@arun-prasad-r I am not able to merge on this repo. @jamesdaniels What are your thoughts on this issue? Does the approach seem inline with your vision for emberfire? Would you like me to make a Pull Request? |
Hey @jamesdaniels, hope you had a good 5-months holidays. When can we expect some news on this? It's been 18 months since this package is broken and no one can actually use this properly. Make Firebase great again. |
…multiple queries. Thanks to @iofusion This solution is adapted from @iofusion's comments on this issue FirebaseExtended#576 (comment)
Addressed in 40a88dc |
rc.4 released. |
So I've been trying to use the
realtime-listener
despite the complete lack of instructions. It works okay.In my component, in the
didReceiveAttrs
method, I'm doing the following:Then in the
willDestroyElement
I do:Now the user would be dynamically updated. But if I add an additional subscription in my
didReceiveAttrs
method, like this:Then the user is not synchronized anymore.
The text was updated successfully, but these errors were encountered: