Remove unnecessary marks, they bring little value
This commit is contained in:
committed by
Stefan Ceriu
parent
e5fbbd99d2
commit
b470d80b3f
@@ -37,8 +37,6 @@ final class TemplateCoordinator: CoordinatorProtocol {
|
||||
viewModel = TemplateViewModel(promptType: parameters.promptType)
|
||||
}
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
func start() {
|
||||
viewModel.callback = { [weak self] action in
|
||||
guard let self else { return }
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
// MARK: - Coordinator
|
||||
|
||||
enum TemplatePromptType {
|
||||
case regular
|
||||
case upgrade
|
||||
@@ -45,15 +43,11 @@ extension TemplatePromptType: Identifiable, CaseIterable {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: View model
|
||||
|
||||
enum TemplateViewModelAction {
|
||||
case accept
|
||||
case cancel
|
||||
}
|
||||
|
||||
// MARK: View
|
||||
|
||||
struct TemplateViewState: BindableState {
|
||||
var promptType: TemplatePromptType
|
||||
var count: Int
|
||||
|
||||
@@ -19,16 +19,8 @@ import SwiftUI
|
||||
typealias TemplateViewModelType = StateStoreViewModel<TemplateViewState, TemplateViewAction>
|
||||
|
||||
class TemplateViewModel: TemplateViewModelType, TemplateViewModelProtocol {
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
// MARK: Public
|
||||
|
||||
var callback: ((TemplateViewModelAction) -> Void)?
|
||||
|
||||
// MARK: - Setup
|
||||
|
||||
init(promptType: TemplatePromptType, initialCount: Int = 0) {
|
||||
super.init(initialViewState: TemplateViewState(promptType: promptType, count: 0))
|
||||
}
|
||||
|
||||
@@ -17,20 +17,14 @@
|
||||
import SwiftUI
|
||||
|
||||
struct TemplateScreen: View {
|
||||
// MARK: Private
|
||||
|
||||
@Environment(\.colorScheme) private var colorScheme
|
||||
|
||||
var counterColor: Color {
|
||||
colorScheme == .light ? .element.secondaryContent : .element.tertiaryContent
|
||||
}
|
||||
|
||||
// MARK: Public
|
||||
|
||||
@ObservedObject var context: TemplateViewModel.Context
|
||||
|
||||
// MARK: Views
|
||||
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
mainContent
|
||||
|
||||
Reference in New Issue
Block a user