Created
August 3, 2017 01:03
-
-
Save shoheiyokoyama/58aa6d0fe1c4a7cbcbebbb95d017766e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
player.asObservable() | |
.flatMapFirst { $0.level.asObservable() } | |
.subscribe(onNext: { print($0) }) | |
.disposed(by: disposeBag) | |
player.onNext(killua) // 50 | |
killua.level.value = 51 // 51 | |
player.onNext(gon) // level of gon isn't printed. | |
gon.level.value = 51 // new level of gon also isn't printed. | |
killua.level.value = 52 // 52 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment