Handle waiting list error. (#1165)

This commit is contained in:
Doug
2023-06-26 18:26:20 +01:00
committed by GitHub
parent bc7faec44a
commit 2fce96d540
25 changed files with 589 additions and 19 deletions
@@ -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,
@@ -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()
@@ -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 {
@@ -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)