step-up-labs / firebase-database-dotnet

C# library for Firebase Realtime Database.
MIT License
668 stars 168 forks source link

AsObservable get count of changed childs #290

Open AlanFloyd opened 1 year ago

AlanFloyd commented 1 year ago

Hello,

i have implemented with success the AsObservable in my app and it is working perfect. I would like to update the user interface, once all changes of childs are received. Is there an option to get the number of all changes to childs (number of childs that are changed) or will this count be always 1, even when more than 1 child was updated.

Greetings and thanks Dietmar

cabauman commented 1 year ago

One option is buffering the changes so you can receive a batch. Buffer returns IObservable<IList>

.AsObservable().Buffer(TimeSpan.FromSeconds(1))
stale[bot] commented 1 year ago

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.