Conversation
…ad of keyRef.setValue also fixes a huge amount of unnecessary 'onDataExited(DataSnapshot dataSnapshot)' events which has not been reported yet. keyRef.updateChildren understands if the data needs to be inserted or updated. No need to use setValue here. Since priorities are not relevant anymore (https://stackoverflow.com/questions/31577915/what-does-priority-mean-in-firebase) i decided to not consider them anymore.
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
1 similar comment
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
|
I signed it! |
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
|
lets try again :D |
|
.. |
| }); | ||
| } else { | ||
| keyRef.setValue(null); | ||
| keyRef.setValueAsync(null); |
There was a problem hiding this comment.
Can you explain your decision to move to Async here?
There was a problem hiding this comment.
It looks like, that the firebase developer changed the name of that function if you do not add a CompletionListener. Before you could call setValue without listener, now you have to call setValueAsync if you do not want to use a listener. Since there is no listener required, i changed it to setValueAsync.
There was a problem hiding this comment.
Forgot to mention. I assume this is the fix for #28, since this function has been changed! (if you check some posts on stackoverflow.com, you will see that they suggest you to use a CompletionListener, which would call the 'old' function) And SetValue must have always been async
|
@jwiesmann thanks for sending this! The core (using |
|
@hiranya911 would love your input here. It seems like in the past, The recent Java changes break this (which is fine) but I wonder how we should proceed here. Should we lock |

Using keyRef.updateChildren instead of keyRef.setValue also fixes a huge amount of unnecessary 'onDataExited(DataSnapshot dataSnapshot)' events, which has not been reported yet. keyRef.updateChildren understands if the data needs to be inserted or updated. No need to use setValue here. Since priorities are not relevant anymore (https://stackoverflow.com/questions/31577915/what-does-priority-mean-in-firebase) i decided to not consider them anymore.