Account URL is now fetched async (#2769)

This commit is contained in:
Mauro
2024-04-30 19:08:32 +02:00
committed by GitHub
parent f688d2eda4
commit 18dc9cd20f
16 changed files with 47 additions and 70 deletions
@@ -113,8 +113,8 @@ class SettingsFlowCoordinator: FlowCoordinatorProtocol {
presentSecureBackupScreen(animated: true)
case .userDetails:
presentUserDetailsEditScreen()
case .accountProfile:
presentAccountProfileURL()
case let .manageAccount(url):
presentAccountManagementURL(url)
case .analytics:
presentAnalyticsScreen()
case .appLock:
@@ -130,8 +130,6 @@ class SettingsFlowCoordinator: FlowCoordinatorProtocol {
presentLegalInformationScreen()
case .blockedUsers:
presentBlockedUsersScreen()
case .accountSessions:
presentAccountSessionsListURL()
case .notifications:
presentNotificationSettings()
case .advancedSettings:
@@ -242,23 +240,7 @@ class SettingsFlowCoordinator: FlowCoordinatorProtocol {
}
// MARK: OIDC Account Management
private func presentAccountProfileURL() {
guard let url = parameters.userSession.clientProxy.accountURL(action: .profile) else {
MXLog.error("Account URL is missing.")
return
}
presentAccountManagementURL(url)
}
private func presentAccountSessionsListURL() {
guard let url = parameters.userSession.clientProxy.accountURL(action: .sessionsList) else {
MXLog.error("Account URL is missing.")
return
}
presentAccountManagementURL(url)
}
private var accountSettingsPresenter: OIDCAccountSettingsPresenter?
private func presentAccountManagementURL(_ url: URL) {
// Note to anyone in the future if you come back here to make this open in Safari instead of a WAS.