Merge branch 'master' into new-swift
# Conflicts: # LeadKitAdditions.podspec
This commit is contained in:
commit
d2e2d1f28b
|
|
@ -18,7 +18,7 @@ Pod::Spec.new do |s|
|
|||
|
||||
ss.dependency "LeadKit", '~> 0.5' # till 0.6
|
||||
ss.dependency "KeychainAccess", '3.0.2'
|
||||
ss.dependency "IDZSwiftCommonCrypto", '~> 0.9'
|
||||
ss.dependency "IDZSwiftCommonCrypto", '0.9.1'
|
||||
ss.dependency "InputMask", '2.2.5'
|
||||
ss.dependency "SwiftValidator", '4.0.0'
|
||||
end
|
||||
|
|
@ -33,7 +33,7 @@ Pod::Spec.new do |s|
|
|||
|
||||
ss.dependency "LeadKit/Core-iOS-Extension", '~> 0.5'
|
||||
ss.dependency "KeychainAccess", '3.0.2'
|
||||
ss.dependency "IDZSwiftCommonCrypto", '~> 0.9'
|
||||
ss.dependency "IDZSwiftCommonCrypto", '0.9.1'
|
||||
ss.dependency "InputMask", '2.2.5'
|
||||
ss.dependency "SwiftValidator", '4.0.0'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public typealias VoidBlock = () -> Void
|
|||
public extension Observable {
|
||||
|
||||
/// Handles connection errors during request
|
||||
public func handleConnectionErrors() -> Observable<Observable.E> {
|
||||
func handleConnectionErrors() -> Observable<Observable.E> {
|
||||
return observeOn(CurrentThreadScheduler.instance)
|
||||
|
||||
// handle no internet connection
|
||||
|
|
@ -60,7 +60,7 @@ public extension Observable {
|
|||
- errorTypes: list of error types, which triggers request restart
|
||||
- retryLimit: how many times request can restarts
|
||||
*/
|
||||
public func retryWithinErrors(_ errorTypes: [Error.Type] = [ConnectionError.self],
|
||||
func retryWithinErrors(_ errorTypes: [Error.Type] = [ConnectionError.self],
|
||||
retryLimit: Int = DefaultNetworkService.retryLimit)
|
||||
-> Observable<Observable.E> {
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ public extension Observable {
|
|||
- apiErrorType: type of errors, received frim server
|
||||
- handler: block, that executes, when error occured
|
||||
*/
|
||||
public func handleApiError<T: ApiErrorProtocol>(_ apiErrorType: T,
|
||||
func handleApiError<T: ApiErrorProtocol>(_ apiErrorType: T,
|
||||
handler: @escaping () -> Void) -> Observable<Observable.E>
|
||||
where T.RawValue == Int {
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ public extension Observable {
|
|||
|
||||
- parameter isLoading: subject, request state bind to
|
||||
*/
|
||||
public func changeLoadingBehaviour(isLoading: PublishSubject<Bool>) -> Observable<Observable.E> {
|
||||
func changeLoadingBehaviour(isLoading: PublishSubject<Bool>) -> Observable<Observable.E> {
|
||||
return observeOn(CurrentThreadScheduler.instance)
|
||||
.do(onNext: { _ in
|
||||
isLoading.onNext(false)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ private enum Keys {
|
|||
public extension UserDefaults {
|
||||
|
||||
/// Default place to store session id
|
||||
public var sessionId: String? {
|
||||
var sessionId: String? {
|
||||
get {
|
||||
return string(forKey: Keys.sessionId)
|
||||
}
|
||||
|
|
@ -40,7 +40,7 @@ public extension UserDefaults {
|
|||
}
|
||||
|
||||
/// Default place to store userLogin
|
||||
public var userLogin: String? {
|
||||
var userLogin: String? {
|
||||
get {
|
||||
return string(forKey: Keys.userLogin)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue