dappsnation / akita-ng-fire

Akita ❤️ Angular 🔥 Firebase
MIT License
131 stars 27 forks source link

fix: loading state does not work with syncing empty collection #270

Closed luke-rogers closed 1 year ago

luke-rogers commented 1 year ago

fixes #238

This ports the changes from this suggested patch of rxfire.

This fix only works when includeMetadataChanges is false. When true then collectionChanges is used directly and as such requires the suggested patch of rxfire to work around.

I've had a go at adding a test which seems to prove that there is no emission on an empty collection without this change, and as such the test fails with a timeout. Not sure if there is a neater way to avoid failing on a timeout and actually asserting on the store loading state.

hakimio commented 1 year ago

Looks good to me. @GrandSchtroumpf @randallmeeker what do you think?

GrandSchtroumpf commented 1 year ago

I haven't encounter this issue myself , but PR looks good 👍

randallmeeker commented 1 year ago

lgtm!

randallmeeker commented 1 year ago

I'm happy to merge unless someone gets to it before me. Probably will run through ng deps and update those and then do a version update, also unless someone gets to it before me)

luke-rogers commented 1 year ago

Pleased you're happy with the changes.

Any chance we could get this released?

luke-rogers commented 1 year ago

@randallmeeker Are you able to release this fix, please?

Currently blocking our upgrade to Firebase 9.

randallmeeker commented 1 year ago

Sorry I was with a client on site for the last 2 weeks and left everything go by the wayside. I'm back and I will get this done this evening and much appreciate the help

randallmeeker commented 1 year ago

sorry caught a bug was sick for a day or so. So lets try this again. Getting through my day jobs tasks this morning and then will do this.