Compare commits
1 Commits
master
...
fix/shared
| Author | SHA1 | Date |
|---|---|---|
|
|
fd0eb18b8a |
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ open class XibView: UIView {
|
|||
frame = CGRect(origin: frame.origin, size: view.frame.size)
|
||||
|
||||
view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
||||
|
||||
|
||||
addSubview(view)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue