Open kokeroulis opened 8 years ago
It looks like the example is not associative. If you swap the order of the follow around; then it works
subscription += credentials
.filter { it.third }
.map { Unit }
.bind(view.signInEnable)
subscription += credentials
.filter { !it.third }
.map { Unit }
.startWith(Unit)
.bind(view.signInDisable)
Is there any reason why you would not map credentials to view.signInEnable
and just replace
val signInEnable: Func1<Observable<Unit>, Subscription>
val signInDisable: Func1<Observable<Unit>, Subscription>
with
val signInEnable: Func1<Observable<Boolean>, Subscription>
?
I think that there is a race condition here. After you fill in the login and the password and you rotate the screen you get back the following
presenter E signInDisable true
E signInDisable true
E signInEnable true
View E signInEnable
E singInDisable
E singInDisable
shouldn't the "view" consume the signals the other way around?
https://gist.github.com/kokeroulis/d4dff13f7e4f814c8a05d7356fc655f6
Steps to reproduce