feat: implement SyncServicesUseCase to sync services from backend and update ObserveAllServicesUseCase to avoid network calls#4750
Conversation
… update ObserveAllServicesUseCase to avoid network calls
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4750 +/- ##
========================================
Coverage 50.73% 50.74%
========================================
Files 603 603
Lines 21518 21522 +4
Branches 3344 3345 +1
========================================
+ Hits 10917 10921 +4
Misses 9614 9614
Partials 987 987
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
| } else { | ||
| if (!servicesSynced) { | ||
| servicesSynced = true | ||
| launch { syncServices() } |
There was a problem hiding this comment.
In that case, shouldn't we wait until services are synced instead of launching sync in a coroutine and then returning services while it's still syncing?
There was a problem hiding this comment.
the idea of this is to not wait, right now the app will just wait even tho the list of services is stored locally and probably didn't change



PR Submission Checklist for internal contributors
The PR Title
SQPIT-764The PR Description
What's new in this PR?
Issues
ObserveAllServicesUseCase only return after a remote API update even tho the list of bots is
Causes (Optional)
the use case will update first and then return
Solutions
split it into ObserveAllServicesUseCase and SyncServicesUseCase and call SyncServicesUseCase from the view model when needed to update
Needs releases with:
Testing
Test Coverage (Optional)
How to Test
Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.
Notes (Optional)
Specify here any other facts that you think are important for this issue.
Attachments (Optional)
Attachments like images, videos, etc. (drag and drop in the text box)
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.