Configured and applied SwiftFormat

This commit is contained in:
Stefan Ceriu
2022-09-27 10:17:22 +03:00
committed by Stefan Ceriu
parent ff2e6ddfa7
commit 43c28d23b7
663 changed files with 2329 additions and 2840 deletions

View File

@@ -63,7 +63,7 @@ class RegistrationWizard {
self.client = client
self.sessionCreator = sessionCreator
self.state = State()
state = State()
}
/// Call this method to get the possible registration flow of the current homeserver.
@@ -164,7 +164,7 @@ class RegistrationWizard {
/// Send the code received by SMS to validate a msisdn.
/// If the code is correct, the registration request will be executed to validate the msisdn.
func handleValidateThreePID(code: String) async throws -> RegistrationResult {
return try await validateThreePid(code: code)
try await validateThreePid(code: code)
}
/// Useful to poll the homeserver when waiting for the email to be validated by the user.
@@ -197,7 +197,6 @@ class RegistrationWizard {
throw RegistrationError.missingThreePIDURL
}
let validationBody = ThreePIDValidationCodeBody(clientSecret: state.clientSecret,
sessionID: threePIDData.registrationResponse.sessionID,
code: code)
@@ -278,7 +277,7 @@ class RegistrationWizard {
/// Checks for a dummy stage and handles it automatically when possible.
private func handleDummyStage(flowResult: FlowResult) async throws -> RegistrationResult {
// If the dummy stage is mandatory, do the dummy stage now
guard flowResult.missingStages.contains(where: { $0.isDummy }) else { return .flowResponse(flowResult) }
guard flowResult.missingStages.contains(where: \.isDummy) else { return .flowResponse(flowResult) }
return try await dummy()
}