mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 11:30:50 +02:00
Added support for MSC3881
This commit is contained in:
+8
-8
@@ -59,12 +59,12 @@ final class UserSessionsOverviewCoordinator: Coordinator, Presentable {
|
||||
self.showAllInactiveSessions()
|
||||
case .verifyCurrentSession:
|
||||
self.startVerifyCurrentSession()
|
||||
case let .showCurrentSessionOverview(session):
|
||||
self.showCurrentSessionOverview(session: session)
|
||||
case let .showCurrentSessionOverview(sessionInfo):
|
||||
self.showCurrentSessionOverview(sessionInfo: sessionInfo)
|
||||
case .showAllOtherSessions:
|
||||
self.showAllOtherSessions()
|
||||
case let .showUserSessionOverview(session):
|
||||
self.showUserSessionOverview(session: session)
|
||||
case let .showUserSessionOverview(sessionInfo):
|
||||
self.showUserSessionOverview(sessionInfo: sessionInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -100,12 +100,12 @@ final class UserSessionsOverviewCoordinator: Coordinator, Presentable {
|
||||
// TODO:
|
||||
}
|
||||
|
||||
private func showCurrentSessionOverview(session: UserSessionInfo) {
|
||||
completion?(.openSessionOverview(session: session))
|
||||
private func showCurrentSessionOverview(sessionInfo: UserSessionInfo) {
|
||||
completion?(.openSessionOverview(sessionInfo: sessionInfo))
|
||||
}
|
||||
|
||||
private func showUserSessionOverview(session: UserSessionInfo) {
|
||||
completion?(.openSessionOverview(session: session))
|
||||
private func showUserSessionOverview(sessionInfo: UserSessionInfo) {
|
||||
completion?(.openSessionOverview(sessionInfo: sessionInfo))
|
||||
}
|
||||
|
||||
private func showAllOtherSessions() {
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ class UserSessionsDataProvider: UserSessionsDataProviderProtocol {
|
||||
session.matrixRestClient.devices(completion: completion)
|
||||
}
|
||||
|
||||
func device(withDeviceId deviceId: String, ofUser userId: String) -> MXDeviceInfo {
|
||||
func device(withDeviceId deviceId: String, ofUser userId: String) -> MXDeviceInfo? {
|
||||
session.crypto.device(withDeviceId: deviceId, ofUser: userId)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ protocol UserSessionsDataProviderProtocol {
|
||||
|
||||
func devices(completion: @escaping (MXResponse<[MXDevice]>) -> Void)
|
||||
|
||||
func device(withDeviceId deviceId: String, ofUser userId: String) -> MXDeviceInfo
|
||||
func device(withDeviceId deviceId: String, ofUser userId: String) -> MXDeviceInfo?
|
||||
|
||||
func accountData(for eventType: String) -> [AnyHashable: Any]?
|
||||
}
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import Foundation
|
||||
// MARK: - Coordinator
|
||||
|
||||
enum UserSessionsOverviewCoordinatorResult {
|
||||
case openSessionOverview(session: UserSessionInfo)
|
||||
case openSessionOverview(sessionInfo: UserSessionInfo)
|
||||
}
|
||||
|
||||
// MARK: View model
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ class UserSessionsOverviewViewModel: UserSessionsOverviewViewModelType, UserSess
|
||||
state.otherSessionsViewData = userSessionsViewData.otherSessions.asViewData()
|
||||
|
||||
if let currentSessionInfo = userSessionsViewData.currentSession {
|
||||
state.currentSessionViewData = UserSessionCardViewData(session: currentSessionInfo)
|
||||
state.currentSessionViewData = UserSessionCardViewData(sessionInfo: currentSessionInfo)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user