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
@@ -14,15 +14,14 @@
// limitations under the License.
//
import SwiftUI
import CommonKit
import SwiftUI
struct OnboardingDisplayNameCoordinatorParameters {
let userSession: UserSession
}
final class OnboardingDisplayNameCoordinator: Coordinator, Presentable {
// MARK: - Properties
// MARK: Private
@@ -58,6 +57,7 @@ final class OnboardingDisplayNameCoordinator: Coordinator, Presentable {
}
// MARK: - Public
func start() {
MXLog.debug("[OnboardingDisplayNameCoordinator] did start.")
onboardingDisplayNameViewModel.completion = { [weak self] result in
@@ -74,7 +74,7 @@ final class OnboardingDisplayNameCoordinator: Coordinator, Presentable {
}
func toPresentable() -> UIViewController {
return self.onboardingDisplayNameHostingController
onboardingDisplayNameHostingController
}
// MARK: - Private
@@ -1,4 +1,4 @@
//
//
// Copyright 2021 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -44,7 +44,7 @@ enum MockOnboardingDisplayNameScreenState: MockScreenState, CaseIterable {
}
/// Generate the view struct for the screen state.
var screenView: ([Any], AnyView) {
var screenView: ([Any], AnyView) {
let viewModel: OnboardingDisplayNameViewModel
switch self {
case .emptyTextField:
@@ -1,4 +1,4 @@
//
//
// Copyright 2021 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,15 +14,14 @@
// limitations under the License.
//
import SwiftUI
import Combine
import SwiftUI
typealias OnboardingDisplayNameViewModelType = StateStoreViewModel<OnboardingDisplayNameViewState,
Never,
OnboardingDisplayNameViewAction>
Never,
OnboardingDisplayNameViewAction>
class OnboardingDisplayNameViewModel: OnboardingDisplayNameViewModelType, OnboardingDisplayNameViewModelProtocol {
// MARK: - Properties
// MARK: Private
@@ -1,4 +1,4 @@
//
//
// Copyright 2021 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,7 +17,6 @@
import Foundation
protocol OnboardingDisplayNameViewModelProtocol {
var completion: ((OnboardingDisplayNameViewModelResult) -> Void)? { get set }
var context: OnboardingDisplayNameViewModelType.Context { get }
@@ -14,8 +14,8 @@
// limitations under the License.
//
import XCTest
import RiotSwiftUI
import XCTest
class OnboardingDisplayNameUITests: MockScreenTestCase {
func testEmptyTextField() {
@@ -55,8 +55,8 @@ class OnboardingDisplayNameUITests: MockScreenTestCase {
func testLongDisplayName() {
let displayName = """
Bacon ipsum dolor amet filet mignon chicken kevin andouille. Doner shoulder beef, brisket bresaola turkey jowl venison. Ham hock cow turducken, chislic venison doner short loin strip steak tri-tip jowl. Sirloin pork belly hamburger ribeye. Tail capicola alcatra short ribs turkey doner.
"""
Bacon ipsum dolor amet filet mignon chicken kevin andouille. Doner shoulder beef, brisket bresaola turkey jowl venison. Ham hock cow turducken, chislic venison doner short loin strip steak tri-tip jowl. Sirloin pork belly hamburger ribeye. Tail capicola alcatra short ribs turkey doner.
"""
app.goToScreenWithIdentifier(MockOnboardingDisplayNameScreenState.longDisplayName(displayName: displayName).title)
let textField = app.textFields.element
@@ -1,4 +1,4 @@
//
//
// Copyright 2021 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,8 +14,8 @@
// limitations under the License.
//
import XCTest
import Combine
import XCTest
@testable import RiotSwiftUI
@@ -1,4 +1,4 @@
//
//
// Copyright 2021 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,7 +17,6 @@
import SwiftUI
struct OnboardingDisplayNameScreen: View {
// MARK: - Properties
// MARK: Private
@@ -64,7 +63,6 @@ struct OnboardingDisplayNameScreen: View {
/// The icon, title and message views.
var header: some View {
VStack(spacing: 8) {
OnboardingIconImage(image: Asset.Images.onboardingCongratulationsIcon)
.padding(.bottom, 8)