Soft logout removal (#672)

* Remove isSoftLogout from everywhere except the client delegate
- bump the RustSDK to v1.0.43
- cleanup the app coordinator state machine and login/logout flows

* Merge `succeededSigningIn` and `succeededRestoringSession` into `createdUserSession` in order to simplify the logic
This commit is contained in:
Stefan Ceriu
2023-03-06 14:58:50 +02:00
committed by GitHub
parent 1fe2e7e882
commit e4117e3205
13 changed files with 34 additions and 122 deletions
@@ -21,10 +21,8 @@ class UserSession: UserSessionProtocol {
private var cancellables = Set<AnyCancellable>()
private var checkForSessionVerificationControllerCancellable: AnyCancellable?
private var authErrorCancellable: AnyCancellable?
private var restoreTokenUpdateCancellable: AnyCancellable?
var userID: String { clientProxy.userID }
var isSoftLogout: Bool { clientProxy.isSoftLogout }
var deviceID: String? { clientProxy.deviceId }
var homeserver: String { clientProxy.homeserver }
@@ -39,7 +37,6 @@ class UserSession: UserSessionProtocol {
setupSessionVerificationWatchdog()
setupAuthErrorWatchdog()
setupRestoreTokenUpdateWatchdog()
}
// MARK: - Private
@@ -102,21 +99,4 @@ class UserSession: UserSessionProtocol {
private func tearDownAuthErrorWatchdog() {
authErrorCancellable = nil
}
// MARK: Restore Token Update Watchdog
private func setupRestoreTokenUpdateWatchdog() {
restoreTokenUpdateCancellable = clientProxy.callbacks
.receive(on: DispatchQueue.main)
.sink { [weak self] callback in
if case .updatedRestoreToken = callback {
self?.callbacks.send(.updateRestoreTokenNeeded)
self?.tearDownRestoreTokenUpdateWatchdog()
}
}
}
private func tearDownRestoreTokenUpdateWatchdog() {
restoreTokenUpdateCancellable = nil
}
}