mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 13:16:58 +02:00
Use softLogoutCredentials in AuthenticationService, fix blank screen before soft logout
This commit is contained in:
+2
-10
@@ -118,16 +118,7 @@ class AuthenticationService: NSObject {
|
||||
}
|
||||
|
||||
/// Credentials to be used when authenticating after soft logout, otherwise `nil`.
|
||||
var softLogoutCredentials: MXCredentials? {
|
||||
guard MXKAccountManager.shared().activeAccounts.isEmpty else { return nil }
|
||||
for account in MXKAccountManager.shared().accounts {
|
||||
if account.isSoftLogout {
|
||||
return account.mxCredentials
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
var softLogoutCredentials: MXCredentials?
|
||||
|
||||
/// Get the last authenticated [Session], if there is an active session.
|
||||
/// - Returns: The last active session if any, or `nil`
|
||||
@@ -179,6 +170,7 @@ class AuthenticationService: NSObject {
|
||||
func reset() {
|
||||
loginWizard = nil
|
||||
registrationWizard = nil
|
||||
softLogoutCredentials = nil
|
||||
|
||||
// The previously used homeserver is re-used as `startFlow` will be called again a replace it anyway.
|
||||
let address = state.homeserver.addressFromUser ?? state.homeserver.address
|
||||
|
||||
Reference in New Issue
Block a user