fix firebase query returns 2 sets for #263#270
fix firebase query returns 2 sets for #263#270tjmonsi merged 5 commits intoFirebaseExtended:masterfrom
Conversation
Signed-off-by: Toni-Jan Keith Monserrat <tonijanmonserrat@gmail.com>
Signed-off-by: Toni-Jan Keith Monserrat <tonijanmonserrat@gmail.com>
Signed-off-by: Toni-Jan Keith Monserrat <tonijanmonserrat@gmail.com>
|
@tjmonsi - thanks a lot for this - I 'll try to test it over during the we! |
|
@christophe-g give me a heads-up when you're done. Thanks :) |
|
Using this commit I'm consistently getting duplicates. I don't have time to explore your code, but here is the test case I was using: https://github.com/tbeattysk/firebase-duplicate-test |
|
@tbeattysk did you manage to use my branch for your test case? |
Signed-off-by: Toni-Jan Keith Monserrat <tonijanmonserrat@gmail.com>
|
@tbeattysk I used your repo as a test case using a fix that I added. It's working now (I think). As for using on-value: see merged PR: #230 |
|
@tjmonsi I have tested the latest commit (80ee04a), and it's still not working 100% correctly based on my test case #263 (comment). Now I don't get the duplicated result, but if you click the "Add query" fast enough, you'll get empty query result on the first few query before the result is "eventually" return in subsequent query. I also have another |
Signed-off-by: Toni-Jan Keith Monserrat <tonijanmonserrat@gmail.com>
|
I think the original idea of using |
|
@andrewspy can you check it again? |
|
@tjmonsi I am happy to report that it is finally working on both my test case and my project. Thanks! |
|
@christophe-g any report? |
|
@tjmonsi - looks good! thanks and sorry for the delay (... quite busy ...) |
|
@tjmonsi Please release the new version |
|
@FluorescentHallucinogen just released 2.2.1... sorry for the delay |
Fixing #263
I saw that the
__queryChangedis being called thrice, making creation of event listeners called thrice. Currently wrapped them in a checker if bothqueryandoldQueryexists with this idea__queryChangedis called in theattachedphased__queryChangedis called when any time a newqueryis created on calculated in the__computeQueryCan anyone give me some feedback on any bugs I missed?
Thanks