Skip to content

Commit

Permalink
Update RxSwift v6.0 deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
cederache committed Jan 11, 2022
1 parent 8689b30 commit 95793c2
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Example/Pods
Example/Podfile.lock
Example/Podfile.lock
*.xcuserstate
2 changes: 1 addition & 1 deletion BeappCache/Classes/RxCacheManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ open class RxCacheManager {

return Disposables.create()
}
.subscribeOn(ConcurrentDispatchQueueScheduler(qos: .background))
.subscribe(on: ConcurrentDispatchQueueScheduler(qos: .background))
}

func buildAsyncObservableCaching<T>(asyncObservable: Single<T>, key: String, customExpirySecond: TimeInterval?) -> Single<CacheWrapper<T>> where T: Codable {
Expand Down
2 changes: 1 addition & 1 deletion BeappCache/Classes/Strategy/AsyncOrCacheStrategy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AsyncOrCacheStrategy: CacheStrategyProtocol {
func getStrategyObservable<T>(cacheObservable: Maybe<CacheWrapper<T>>, asyncObservable: Single<CacheWrapper<T>>) -> Observable<CacheWrapper<T>> where T: Codable {
return asyncObservable
.asObservable()
.catchError({ (error) in
.catch({ (error) in
print("[ERROR] \(error)")
return cacheObservable.asObservable().ifEmpty(switchTo: Observable.error(error))
})
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 95793c2

Please sign in to comment.