vector-im/element-x-ios/issues/53 - Various tweaks following code review

This commit is contained in:
Stefan Ceriu
2022-05-25 16:51:48 +03:00
committed by Stefan Ceriu
parent 73f507045b
commit 8fec97217f
23 changed files with 172 additions and 126 deletions
@@ -16,8 +16,7 @@
import SwiftUI
typealias TemplateSimpleScreenViewModelType = StateStoreViewModel<TemplateSimpleScreenViewState,
TemplateSimpleScreenViewAction>
typealias TemplateSimpleScreenViewModelType = StateStoreViewModel<TemplateSimpleScreenViewState, TemplateSimpleScreenViewAction>
class TemplateSimpleScreenViewModel: TemplateSimpleScreenViewModelType, TemplateSimpleScreenViewModelProtocol {
@@ -34,10 +33,10 @@ class TemplateSimpleScreenViewModel: TemplateSimpleScreenViewModelType, Template
init(promptType: TemplateSimpleScreenPromptType, initialCount: Int = 0) {
super.init(initialViewState: TemplateSimpleScreenViewState(promptType: promptType, count: 0))
}
// MARK: - Public
override func process(viewAction: TemplateSimpleScreenViewAction) {
override func process(viewAction: TemplateSimpleScreenViewAction) async {
switch viewAction {
case .accept:
completion?(.accept)