capawesome-team / capacitor-firebase

⚡️ Firebase plugins for Capacitor. Supports Android, iOS and the Web.

Home Page:https://capawesome.io/plugins/firebase/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feat(firestore): Include "metadata" property on snapshot

wibimaster opened this issue · comments

Plugin(s)

  • Analytics
  • App
  • App Check
  • Authentication
  • Crashlytics
  • Cloud Firestore
  • Cloud Messaging
  • Cloud Storage
  • Performance
  • Remote Config

Current problem

Firestore SDK permits to save data offline and persist online when connection is active.
It let us know when the data is saved offline or online.

This Capacitor plugin doesn't have this option.

Preferred solution

Official documentation (web, swift, java) : https://firebase.google.com/docs/firestore/manage-data/enable-offline?hl=fr#web-modular-api_2

Is it possible to have the same feature on this Capacitor plugin ?

The addCollectionSnapshotListener or addDocumentSnapshotListener could have an option to add metadata property on snapshot result :)

Alternative options

No response

Additional context

No response

Before submitting

I close this as duplicate of #467.

@robingenz That's not really a dup', because it's not the same feature ; #467 is about getDocumentChanges() of the querySnapshot, and #567 is about metadata property of a listener. But you can do both at the same time in #467 :)

Sorry, in this case I keep it open.