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
@@ -1,6 +1,6 @@
// File created from TemplateAdvancedRoomsExample
// $ createSwiftUITwoScreen.sh Spaces/SpaceCreation SpaceCreation SpaceCreationMenu SpaceCreationSettings
//
//
// Copyright 2021 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -19,7 +19,6 @@
import Foundation
import SwiftUI
/// Using an enum for the screen allows you define the different state cases with
/// the relevant associated data for each case.
enum MockSpaceCreationSettingsScreenState: MockScreenState, CaseIterable {
@@ -40,7 +39,7 @@ enum MockSpaceCreationSettingsScreenState: MockScreenState, CaseIterable {
let creationParameters = SpaceCreationParameters()
creationParameters.name = "Fake"
let service: MockSpaceCreationSettingsService = MockSpaceCreationSettingsService()
let service = MockSpaceCreationSettingsService()
switch self {
case .privateSpace:
creationParameters.isPublic = false
@@ -60,7 +59,7 @@ enum MockSpaceCreationSettingsScreenState: MockScreenState, CaseIterable {
return (
[service, viewModel],
AnyView(SpaceCreationSettings(viewModel: viewModel.context)
.addDependency(MockAvatarService.example))
.addDependency(MockAvatarService.example))
)
}
}
@@ -1,6 +1,6 @@
// File created from TemplateAdvancedRoomsExample
// $ createSwiftUITwoScreen.sh Spaces/SpaceCreation SpaceCreation SpaceCreationMenu SpaceCreationSettings
//
//
// Copyright 2021 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,19 +16,17 @@
// limitations under the License.
//
import Foundation
import Combine
import Foundation
class MockSpaceCreationSettingsService: SpaceCreationSettingsServiceProtocol {
var addressValidationSubject: CurrentValueSubject<SpaceCreationSettingsAddressValidationStatus, Never>
var avatarViewDataSubject: CurrentValueSubject<AvatarInputProtocol, Never>
var defaultAddressSubject: CurrentValueSubject<String, Never>
var spaceAddress: String?
var roomName: String
var userDefinedAddress: String?
var isAddressValid: Bool = true
var isAddressValid = true
init() {
roomName = "Fake"
@@ -38,7 +36,7 @@ class MockSpaceCreationSettingsService: SpaceCreationSettingsServiceProtocol {
}
func simulateUpdate(addressValidationStatus: SpaceCreationSettingsAddressValidationStatus) {
self.addressValidationSubject.value = addressValidationStatus
addressValidationSubject.value = addressValidationStatus
}
// func simulateUpdate()