mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
Configured and applied SwiftFormat
This commit is contained in:
committed by
Stefan Ceriu
parent
ff2e6ddfa7
commit
43c28d23b7
+2
-3
@@ -14,15 +14,14 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import CommonKit
|
||||
import SwiftUI
|
||||
|
||||
struct TemplateSimpleScreenCoordinatorParameters {
|
||||
let promptType: TemplateSimpleScreenPromptType
|
||||
}
|
||||
|
||||
final class TemplateSimpleScreenCoordinator: Coordinator, Presentable {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
@@ -65,7 +64,7 @@ final class TemplateSimpleScreenCoordinator: Coordinator, Presentable {
|
||||
}
|
||||
|
||||
func toPresentable() -> UIViewController {
|
||||
return self.templateSimpleScreenHostingController
|
||||
templateSimpleScreenHostingController
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -37,7 +37,7 @@ enum MockTemplateSimpleScreenScreenState: MockScreenState, CaseIterable {
|
||||
}
|
||||
|
||||
/// Generate the view struct for the screen state.
|
||||
var screenView: ([Any], AnyView) {
|
||||
var screenView: ([Any], AnyView) {
|
||||
let promptType: TemplateSimpleScreenPromptType
|
||||
switch self {
|
||||
case .promptType(let type):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
||||
+2
-3
@@ -17,11 +17,10 @@
|
||||
import SwiftUI
|
||||
|
||||
typealias TemplateSimpleScreenViewModelType = StateStoreViewModel<TemplateSimpleScreenViewState,
|
||||
Never,
|
||||
TemplateSimpleScreenViewAction>
|
||||
Never,
|
||||
TemplateSimpleScreenViewAction>
|
||||
|
||||
class TemplateSimpleScreenViewModel: TemplateSimpleScreenViewModelType, TemplateSimpleScreenViewModelProtocol {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
+1
-2
@@ -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 TemplateSimpleScreenViewModelProtocol {
|
||||
|
||||
var completion: ((TemplateSimpleScreenViewModelResult) -> Void)? { get set }
|
||||
var context: TemplateSimpleScreenViewModelType.Context { get }
|
||||
}
|
||||
|
||||
+1
-1
@@ -14,8 +14,8 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import RiotSwiftUI
|
||||
import XCTest
|
||||
|
||||
class TemplateSimpleScreenUITests: MockScreenTestCase {
|
||||
func testTemplateSimpleScreenPromptRegular() {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
||||
@@ -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 TemplateSimpleScreen: View {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
@@ -64,10 +63,10 @@ struct TemplateSimpleScreen: View {
|
||||
Image(viewModel.viewState.promptType.image.name)
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width:100)
|
||||
.frame(width: 100)
|
||||
.foregroundColor(theme.colors.accent)
|
||||
|
||||
HStack{
|
||||
HStack {
|
||||
Text("Counter: \(viewModel.viewState.count)")
|
||||
.foregroundColor(theme.colors.primaryContent)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user