Update newState signature to not require calling it.copy()

This commit is contained in:
Moez Bhatti
2018-06-05 19:56:34 -04:00
parent fc99ae83ad
commit 1aeddec7bd
11 changed files with 96 additions and 96 deletions
@@ -40,7 +40,7 @@ abstract class QkViewModel<in View : QkView<State>, State>(initialState: State)
.subscribe { view.render(it) }
}
protected fun newState(reducer: (State) -> State) {
protected fun newState(reducer: State.() -> State) {
state.value?.let { state.onNext(reducer(it)) }
}