diff --git a/RxExample/RxExample/Examples/GitHubSearchRepositories/GitHubSearchRepositoriesViewController.swift b/RxExample/RxExample/Examples/GitHubSearchRepositories/GitHubSearchRepositoriesViewController.swift index f0c4d5f6..637c85c7 100644 --- a/RxExample/RxExample/Examples/GitHubSearchRepositories/GitHubSearchRepositoriesViewController.swift +++ b/RxExample/RxExample/Examples/GitHubSearchRepositories/GitHubSearchRepositoriesViewController.swift @@ -124,7 +124,6 @@ class GitHubSearchRepositoriesViewController: ViewController, UITableViewDelegat // activity indicator in status bar // { GitHubSearchRepositoriesAPI.sharedAPI.activityIndicator - .distinctUntilChanged() .driveNext { active in UIApplication.sharedApplication().networkActivityIndicatorVisible = active } diff --git a/RxExample/RxExample/Services/ActivityIndicator.swift b/RxExample/RxExample/Services/ActivityIndicator.swift index f86c5b34..84881e67 100644 --- a/RxExample/RxExample/Services/ActivityIndicator.swift +++ b/RxExample/RxExample/Services/ActivityIndicator.swift @@ -46,6 +46,7 @@ class ActivityIndicator : DriverConvertibleType { init() { _loading = _variable .map { $0 > 0 } + .distinctUntilChanged() .asDriver { (error: ErrorType) -> Driver in _ = fatalError("Loader can't fail") return Drive.empty()