refactor(sync): allow concurrent sync start stop [WPB-15262] #3888
+265
−237
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
Kalium is changing to allow concurrent sync start/stop. We need to address breaking changes on the app.
Solutions
Remove a lot of sensitive code and let Kalium figure it out.
Instead of having
ConnectionPolicyManager
to figure out if the connection policy can go up or down, we just make aSyncRequest
when needed.Most of the additions in this PR are for extra tests and inclusion of Fakes.
Considering that
ConnectionPolicy
doesn't exist anymore, this PR also changedConnectionPolicyManager
toSyncLifecycleManager
, which is only responsible for requesting Sync when a push notification comes, or when the app is on the foreground.It doesn't need to care about Persistent WebSocket anymore either, now that concurrent sync is possible.
The
PersistentWebsocketService
can request sync completely independently fromSyncLifecycleManager
.Dependencies
Needs releases with:
Testing
Test Coverage
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.