mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
vector-im/element-x-ios/issues/53 - Various tweaks following code review
This commit is contained in:
committed by
Stefan Ceriu
parent
73f507045b
commit
8fec97217f
@@ -99,14 +99,15 @@ class StateStoreViewModel<State: BindableState, ViewAction> {
|
||||
self.context = Context(initialViewState: initialViewState)
|
||||
self.context.viewActions.sink { [weak self] action in
|
||||
guard let self = self else { return }
|
||||
self.process(viewAction: action)
|
||||
|
||||
Task { await self.process(viewAction: action) }
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
/// Override to handles incoming `ViewAction`s from the `ViewModel`.
|
||||
/// - Parameter viewAction: The `ViewAction` to be processed in `ViewModel` implementation.
|
||||
func process(viewAction: ViewAction) {
|
||||
func process(viewAction: ViewAction) async {
|
||||
// Default implementation, -no-op
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user