Closed ghost closed 4 years ago
I am not sure what the AsObservableCollection
extension method does, but I would assume that's what causes the duplication. Essentially you can receive the same User
object multiple times when you subscribe (it can change on server, connection can be restarted etc). In that case you need to manually handle the object being received again - either replacing the old one, or updating it.
Just use Clear() in ur datagrid before you add a new item o modify
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Closing the issue due to inactivity. Feel free to re-open
Awesome work @bezysoftware
I'm trying to feed a simple ItemsControl list with real time data using AsObservible. It's updating correctly when changing data in Firebase but all objects in my collection is duplicating randomly over time.
First all objects loads but after like 30 seconds the same objects adds to the list.
Is this the wrong approach or am I missing something?
Cheers!