Compare commits

...

1 Commits

Author SHA1 Message Date
Alexey Gerasimov fd0eb18b8a Temp shared UIApplication fix 2017-04-06 19:59:44 +03:00
3 changed files with 13 additions and 13 deletions

View File

@ -38,10 +38,10 @@ open class NetworkService {
/// Let netwrok service automatically show / hide activity indicator
public func bindActivityIndicator() {
return requestCount.asDriver()
.map { $0 != 0 }
.drive(UIApplication.shared.rx.isNetworkActivityIndicatorVisible)
.addDisposableTo(disposeBag)
// return requestCount.asDriver()
// .map { $0 != 0 }
// .drive(UIApplication.shared.rx.isNetworkActivityIndicatorVisible)
// .addDisposableTo(disposeBag)
}
/// Creates new instance of NetworkService with given Alamofire session manager

View File

@ -51,7 +51,7 @@ open class XibView: UIView {
frame = CGRect(origin: frame.origin, size: view.frame.size)
view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
addSubview(view)
}

View File

@ -29,15 +29,15 @@ public extension Observable {
///
/// - Returns: The source sequence with the side-effecting behavior applied.
func showErrorsInToastInDebugMode() -> Observable<Observable.E> {
#if DEBUG
return `do`(onError: { (error) in
DispatchQueue.main.async {
UIApplication.shared.keyWindow?.makeToast(error.localizedDescription)
}
})
#else
// #if DEBUG
// return `do`(onError: { (error) in
// DispatchQueue.main.async {
// UIApplication.shared.keyWindow?.makeToast(error.localizedDescription)
// }
// })
// #else
return self
#endif
// #endif
}
}