Last active
February 21, 2019 14:36
-
-
Save yonivav/1f3de5dba00ba045063c5a159c97f394 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service | |
.flatMap { [weak self] text -> Observable<Void> in | |
guard let self = self else { return .empty() } | |
. | |
. | |
. | |
return self.network | |
.request(url: url) | |
.do(onNext: { response in | |
self.status.value = .success(response) | |
}, onError: { _ in | |
self.fetchStatus() | |
.subscribe() | |
.disposed(by: self.bag) | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment