Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: retain multiple calls per event until consumed #5967

Closed
robingenz opened this issue Oct 1, 2022 · 3 comments · Fixed by #6419
Closed

feat: retain multiple calls per event until consumed #5967

robingenz opened this issue Oct 1, 2022 · 3 comments · Fixed by #6419

Comments

@robingenz
Copy link
Contributor

Feature Request

Description

Currently retainUntilConsumed supports only one call per event. This leads to older calls being dropped when a new call is received, even though both calls may still be relevant.

Example: My Capacitor Firebase Cloud Messaging plugin has a notificationReceived listener, which should return all notifications received while the app was not active and not only the last notification.

Platform(s)

  • Android
  • iOS

Preferred Solution

The retainUntilConsumed option should save all calls.

Alternatives

Additional Context

@riderx
Copy link

riderx commented Oct 6, 2022

@robingenz maybe return array instead of one event could fix your issue no ?

@robingenz
Copy link
Contributor Author

No, unfortunately not. Since I don't know when the event will be consumed, I also don't know when I have to clear the array again.
Besides, this would only be a workaround with a bad developer experience.

@ionitron-bot
Copy link

ionitron-bot bot commented Apr 30, 2023

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Apr 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants