mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Fixes cache cleaning behavior after sdk change
This commit is contained in:
committed by
Stefan Ceriu
parent
1981270840
commit
a2b38f7656
@@ -458,20 +458,21 @@ class AppCoordinator: AppCoordinatorProtocol {
|
||||
private func clearCache() {
|
||||
showLoadingIndicator()
|
||||
|
||||
defer {
|
||||
hideLoadingIndicator()
|
||||
}
|
||||
|
||||
navigationRootCoordinator.setRootCoordinator(SplashScreenCoordinator())
|
||||
|
||||
userSession.clientProxy.stopSync()
|
||||
userSessionFlowCoordinator?.stop()
|
||||
|
||||
userSessionStore.clearCacheFor(userSession: userSession)
|
||||
|
||||
let userID = userSession.userID
|
||||
tearDownUserSession()
|
||||
|
||||
stateMachine.processEvent(.startWithExistingSession)
|
||||
|
||||
// Allow for everything to deallocate properly
|
||||
Task {
|
||||
try await Task.sleep(for: .seconds(2))
|
||||
userSessionStore.clearCache(for: userID)
|
||||
stateMachine.processEvent(.startWithExistingSession)
|
||||
hideLoadingIndicator()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user