-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fix excessive api call #3157
Fix excessive api call #3157
Conversation
storeIndexedProof is called from storeRemoteCapture. storeRemoteCapture most of the time is called when user restore (during app start) or reload (triggers pull to refresh)
@@ -72,8 +72,7 @@ export class CaptureItemComponent { | |||
); | |||
|
|||
readonly hasCaption$ = this.proof$.pipe( | |||
switchMap(proof => this.diaBackendAssetRepository.fetchByProof$(proof)), | |||
map(asset => asset.caption !== '') | |||
map(proof => proof.caption.trim() !== '') |
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.
Is there any reason why trim()
is added?
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.
@shc261392, just for safety. But I believe backend handles empty strings therefore I removed trim() in this commit refactor(capture-item): remove unnecessary .trim() on caption
d9b5652
into
v240104-capture-cam-ionic-launch
Fixes #3137. Here is the demo
┆Issue is synchronized with this Asana task by Unito