mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 03:20:50 +02:00
fix 7646
This commit is contained in:
@@ -123,7 +123,11 @@ final class UserSessionsFlowCoordinator: NSObject, Coordinator, Presentable {
|
||||
if sessionInfo.isCurrent {
|
||||
self.showLogoutConfirmationForCurrentSession()
|
||||
} else {
|
||||
self.showLogoutConfirmation(for: [sessionInfo])
|
||||
if let logoutURL = self.parameters.session.homeserverWellknown.authentication?.getMasLogoutDeviceURL(fromDeviceID: sessionInfo.id) {
|
||||
self.openMasLogoutURL(logoutURL)
|
||||
} else {
|
||||
self.showLogoutConfirmation(for: [sessionInfo])
|
||||
}
|
||||
}
|
||||
case let .showSessionStateInfo(sessionInfo):
|
||||
self.showInfoSheet(parameters: .init(userSessionInfo: sessionInfo, parentSize: self.toPresentable().view.bounds.size))
|
||||
@@ -182,6 +186,11 @@ final class UserSessionsFlowCoordinator: NSObject, Coordinator, Presentable {
|
||||
return UserOtherSessionsCoordinator(parameters: parameters)
|
||||
}
|
||||
|
||||
private func openMasLogoutURL(_ url: URL) {
|
||||
UIApplication.shared.open(url)
|
||||
popToSessionsOverview()
|
||||
}
|
||||
|
||||
/// Shows a confirmation dialog to the user to sign out of a session.
|
||||
private func showLogoutConfirmation(for sessionInfos: [UserSessionInfo]) {
|
||||
// Use a UIAlertController as we don't have confirmationDialog in SwiftUI on iOS 14.
|
||||
|
||||
Reference in New Issue
Block a user