mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 09:02:44 +02:00
Configured and applied SwiftFormat
This commit is contained in:
committed by
Stefan Ceriu
parent
ff2e6ddfa7
commit
43c28d23b7
+2
-3
@@ -1,6 +1,6 @@
|
||||
// File created from SimpleUserProfileExample
|
||||
// $ createScreen.sh Spaces/SpaceCreation/SpaceCreationPostProcess SpaceCreationPostProcess
|
||||
//
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -24,7 +24,6 @@ import SwiftUI
|
||||
enum MockSpaceCreationPostProcessScreenState: MockScreenState {
|
||||
static var screenStates: [MockScreenState] = [MockSpaceCreationPostProcessScreenState.running, MockSpaceCreationPostProcessScreenState.done, MockSpaceCreationPostProcessScreenState.doneWithError]
|
||||
|
||||
|
||||
// A case for each state you want to represent
|
||||
// with specific, minimal associated data that will allow you
|
||||
// mock that screen.
|
||||
@@ -38,7 +37,7 @@ enum MockSpaceCreationPostProcessScreenState: MockScreenState {
|
||||
}
|
||||
|
||||
/// Generate the view struct for the screen state.
|
||||
var screenView: ([Any], AnyView) {
|
||||
var screenView: ([Any], AnyView) {
|
||||
let service: MockSpaceCreationPostProcessService
|
||||
switch self {
|
||||
case .running:
|
||||
|
||||
+8
-9
@@ -1,6 +1,6 @@
|
||||
// File created from SimpleUserProfileExample
|
||||
// $ createScreen.sh Spaces/SpaceCreation/SpaceCreationPostProcess SpaceCreationPostProcess
|
||||
//
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -16,12 +16,11 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import Combine
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
class MockSpaceCreationPostProcessService: SpaceCreationPostProcessServiceProtocol {
|
||||
|
||||
static let defaultTasks: [SpaceCreationPostProcessTask] = [
|
||||
SpaceCreationPostProcessTask(type: .createSpace, title: "Space creation", state: .success),
|
||||
SpaceCreationPostProcessTask(type: .createRoom("Room#1"), title: "Room#1 creation", state: .failure),
|
||||
@@ -53,22 +52,22 @@ class MockSpaceCreationPostProcessService: SpaceCreationPostProcessServiceProtoc
|
||||
var tasksSubject: CurrentValueSubject<[SpaceCreationPostProcessTask], Never>
|
||||
private(set) var createdSpaceId: String?
|
||||
var avatar: AvatarInput {
|
||||
return AvatarInput(mxContentUri: nil, matrixItemId: "", displayName: "Some space")
|
||||
AvatarInput(mxContentUri: nil, matrixItemId: "", displayName: "Some space")
|
||||
}
|
||||
|
||||
var avatarImage: UIImage? {
|
||||
return nil
|
||||
nil
|
||||
}
|
||||
|
||||
init(
|
||||
tasks: [SpaceCreationPostProcessTask] = defaultTasks
|
||||
) {
|
||||
self.tasksSubject = CurrentValueSubject<[SpaceCreationPostProcessTask], Never>(tasks)
|
||||
tasksSubject = CurrentValueSubject<[SpaceCreationPostProcessTask], Never>(tasks)
|
||||
}
|
||||
|
||||
func simulateUpdate(tasks: [SpaceCreationPostProcessTask]) {
|
||||
self.tasksSubject.send(tasks)
|
||||
tasksSubject.send(tasks)
|
||||
}
|
||||
|
||||
func run() {
|
||||
}
|
||||
func run() { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user