Open HadiAyoub opened 3 years ago
My gut feeling is this could be related to caching?
Can confirm, this is related to query caching. Seems like a bug, rather than intended behaviour as described here though: https://github.com/angular/angularfire/issues/2336
as the cached result is incorrect.
Same issue here. If you listen to a document directly, it does not even have to be the same collection. If you have multiple listeners and 1 listener gets an update all listeners will fire a "modified" event.
I have noticed this behavior as well
+1
Version info
Angular: 10.0.9
Firebase: ^7.13.1
AngularFire: ^6.02
Other (e.g. Ionic/Cordova, Node, browser, operating system):
How to reproduce these conditions
Create multiple valueChange subscriptions to the same collection (with a different query)
AND
In my case, I am unsubscribing from the second listener and recreating it with a different limitToLast value (though I'm unsure if that's necessary to reproduce)
Debug output
none
Expected behavior
Each valueChange listener should only fire results for itself
Actual behavior
the first listener is returning valueChanges that match the query for the second listener.