Moves `disctinctUntilChanged` to `ActivityIndicator`.
This commit is contained in:
parent
c534db0fac
commit
6dcdf281b8
|
|
@ -124,7 +124,6 @@ class GitHubSearchRepositoriesViewController: ViewController, UITableViewDelegat
|
|||
// activity indicator in status bar
|
||||
// {
|
||||
GitHubSearchRepositoriesAPI.sharedAPI.activityIndicator
|
||||
.distinctUntilChanged()
|
||||
.driveNext { active in
|
||||
UIApplication.sharedApplication().networkActivityIndicatorVisible = active
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ class ActivityIndicator : DriverConvertibleType {
|
|||
init() {
|
||||
_loading = _variable
|
||||
.map { $0 > 0 }
|
||||
.distinctUntilChanged()
|
||||
.asDriver { (error: ErrorType) -> Driver<Bool> in
|
||||
_ = fatalError("Loader can't fail")
|
||||
return Drive.empty()
|
||||
|
|
|
|||
Loading…
Reference in New Issue