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 /// Let netwrok service automatically show / hide activity indicator
public func bindActivityIndicator() { public func bindActivityIndicator() {
return requestCount.asDriver() // return requestCount.asDriver()
.map { $0 != 0 } // .map { $0 != 0 }
.drive(UIApplication.shared.rx.isNetworkActivityIndicatorVisible) // .drive(UIApplication.shared.rx.isNetworkActivityIndicatorVisible)
.addDisposableTo(disposeBag) // .addDisposableTo(disposeBag)
} }
/// Creates new instance of NetworkService with given Alamofire session manager /// 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) frame = CGRect(origin: frame.origin, size: view.frame.size)
view.autoresizingMask = [.flexibleWidth, .flexibleHeight] view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
addSubview(view) addSubview(view)
} }

View File

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