-
Notifications
You must be signed in to change notification settings - Fork 290
feat(bindings): added APIs to get the media preview config from the store #5062
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
Conversation
@poljar I wonder if we shouldn't actually use also in the observable API the currently stored value, instead of doing a request to the server... WDYT? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5062 +/- ##
==========================================
- Coverage 85.81% 85.75% -0.06%
==========================================
Files 325 325
Lines 35922 35932 +10
==========================================
- Hits 30826 30815 -11
- Misses 5096 5117 +21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
As mentioned here: #5062 (comment). Yes we can do that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, let's just rename the methods a bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looking good.
The reason behind this PR, is to extend #5040
While the observable value is very useful in the context of the main app, it may be problematic in the context of parallel processes that aim to aid the main app process, like for example the Notification Service Extension on iOS, which is treated as a different process, and has some very harsh memory contraints, and a limited lifetime, which would make the observable values not quite useful.
Also while we do have a
get_media_preview_config_event_content
that is used by the observable API, this sends a request to the server to check for the current account data value of such event, and in the context of the NSE which already waits for a sync, we probably do not want to slow it down with another request to the server (not mentioning that sending a request for each notification might be also problematic for the servers).For the NSE scenario I think getting whatever is currently in the store would be fine.