Created
August 7, 2017 05:33
-
-
Save jumbo-in-Jap/72e6338c16d7e1fc63d83b40b7bce399 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
let timer: Observable<Int> = Observable.interval(30.0, scheduler: MainScheduler.instance) | |
timer | |
.subscribe(onNext: { (notice) in | |
// 再接続処理 | |
if self.viewModel.chatStatus.value == LessonViewModel.ChatStatus.DisConnectedWithTutor{ | |
self.viewModel.recallTo() | |
} | |
}).addDisposableTo(disposeBag) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment