Stop the sync service constantly attempting to restart on auth error. (#1654)

Additionally removes a retain cycle that was preventing the client from being released.

Remove restartSync - the SDK has changed a lot, we no longer need to stop and start the sync loop.
This commit is contained in:
Doug
2023-09-08 11:00:12 +01:00
committed by GitHub
parent 29b2b7ff4a
commit 1eac02f7b0
2 changed files with 18 additions and 21 deletions
@@ -73,14 +73,15 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
setupStateMachine()
roomFlowCoordinator.actions.sink { action in
roomFlowCoordinator.actions.sink { [weak self] action in
guard let self else { return }
switch action {
case .presentedRoom(let roomID):
self.analytics.signpost.beginRoomFlow(roomID)
self.stateMachine.processEvent(.selectRoom(roomID: roomID))
analytics.signpost.beginRoomFlow(roomID)
stateMachine.processEvent(.selectRoom(roomID: roomID))
case .dismissedRoom:
self.stateMachine.processEvent(.deselectRoom)
self.analytics.signpost.endRoomFlow()
stateMachine.processEvent(.deselectRoom)
analytics.signpost.endRoomFlow()
}
}
.store(in: &cancellables)