mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Handle waiting list error. (#1165)
This commit is contained in:
+2
-2
@@ -31,10 +31,10 @@ enum MockSoftLogoutScreenState: String, CaseIterable {
|
||||
|
||||
/// Generate the view struct for the screen state.
|
||||
@MainActor var viewModel: SoftLogoutScreenViewModel {
|
||||
let credentials = SoftLogoutScreenCredentials(userId: "@mock:matrix.org",
|
||||
let credentials = SoftLogoutScreenCredentials(userID: "@mock:matrix.org",
|
||||
homeserverName: "matrix.org",
|
||||
userDisplayName: "mock",
|
||||
deviceId: nil)
|
||||
deviceID: nil)
|
||||
switch self {
|
||||
case .emptyPassword:
|
||||
return SoftLogoutScreenViewModel(credentials: credentials,
|
||||
|
||||
+2
-2
@@ -108,7 +108,7 @@ final class SoftLogoutScreenCoordinator: CoordinatorProtocol {
|
||||
|
||||
/// Login with the supplied username and password.
|
||||
@MainActor private func login(withPassword password: String) {
|
||||
let username = parameters.credentials.userId
|
||||
let username = parameters.credentials.userID
|
||||
|
||||
startLoading()
|
||||
|
||||
@@ -116,7 +116,7 @@ final class SoftLogoutScreenCoordinator: CoordinatorProtocol {
|
||||
switch await authenticationService.login(username: username,
|
||||
password: password,
|
||||
initialDeviceName: UIDevice.current.initialDeviceName,
|
||||
deviceId: parameters.credentials.deviceId) {
|
||||
deviceID: parameters.credentials.deviceID) {
|
||||
case .success(let userSession):
|
||||
callback?(.signedIn(userSession))
|
||||
stopLoading()
|
||||
|
||||
+2
-2
@@ -17,10 +17,10 @@
|
||||
import SwiftUI
|
||||
|
||||
struct SoftLogoutScreenCredentials {
|
||||
let userId: String
|
||||
let userID: String
|
||||
let homeserverName: String
|
||||
let userDisplayName: String
|
||||
let deviceId: String?
|
||||
let deviceID: String?
|
||||
}
|
||||
|
||||
enum SoftLogoutScreenViewModelAction: CustomStringConvertible {
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ struct SoftLogoutScreen: View {
|
||||
.foregroundColor(.compound.textPrimary)
|
||||
.accessibilityIdentifier(A11yIdentifiers.softLogoutScreen.title)
|
||||
|
||||
Text(UntranslatedL10n.softLogoutSigninNotice(context.viewState.credentials.homeserverName, context.viewState.credentials.userDisplayName, context.viewState.credentials.userId))
|
||||
Text(UntranslatedL10n.softLogoutSigninNotice(context.viewState.credentials.homeserverName, context.viewState.credentials.userDisplayName, context.viewState.credentials.userID))
|
||||
.font(.compound.bodyLG)
|
||||
.multilineTextAlignment(.leading)
|
||||
.foregroundColor(.compound.textPrimary)
|
||||
|
||||
Reference in New Issue
Block a user