You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 29, 2022. It is now read-only.
I'd like to have an entry point into the updateLocationInfo method.
Our use case:
All of our data is structured in a real-time database. Geohashes and data are not separated and hence data can get changed without a location change.
Example: We have point of interests that have a certain coordinate. Within those pois, we have data associated and that data can get changed. With the current implementation, we'll never see a change event for this in our listener since the location stayed the same.
Our solution: We extended the changedLocation check to also check for a versionCode that gets incremented by every data change.
Proposal: Some generic api that can handle this and other use cases. Possibly there's a method that takes the old and current snapshot and can then return an enum whether things have been added, changed, removed or nothing (null).
The text was updated successfully, but these errors were encountered:
With #113 we'd get one step closer here. We'd need to pass the old DataSnapshot (which can be null) and the current one to do a comparison.
Working with only DataSnapshot feels a bit weird. I guess it could work since we could use the underlying HashMap to get things out although I'm not sure whether the usage of that is favored or not. Also, using the HashMap and some nasty assumptions about the structure is definitely more advanced, although this entire use case is.
I'd like to have an entry point into the
updateLocationInfo
method.Our use case:
All of our data is structured in a real-time database. Geohashes and data are not separated and hence data can get changed without a location change.
Example: We have point of interests that have a certain coordinate. Within those pois, we have data associated and that data can get changed. With the current implementation, we'll never see a change event for this in our listener since the location stayed the same.
Our solution: We extended the
changedLocation
check to also check for a versionCode that gets incremented by every data change.Proposal: Some generic api that can handle this and other use cases. Possibly there's a method that takes the old and current snapshot and can then return an enum whether things have been added, changed, removed or nothing (null).
The text was updated successfully, but these errors were encountered: