enebin / Aespa

From camera to album, in just 2 lines
https://enebin.github.io/Aespa/documentation/aespa/
MIT License
91 stars 20 forks source link

Prevent publishers from firing on startup #53

Open derwaldgeist opened 2 months ago

derwaldgeist commented 2 months ago

On every app start, the session sends events to the photoPublisher and the videoPublisher. I assume this is to restore the display of any previously shot photos or videos. However, in my app, this would trigger an upload to the server.

Is there a way to prevent these initial event sends - or at least detect if these photos and videos are published in response to a current user interaction (i.e. the user shoots a photo or records a video)?

derwaldgeist commented 2 months ago

I also noted that the publishers (e.g. the photoPublisher) are called multiple times on startup, even though I create the session only once. What might be the reason for his?