Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine Version of ActivityIndicator and ErrorTacker #80

Open
mahi8514 opened this issue May 31, 2020 · 1 comment
Open

Combine Version of ActivityIndicator and ErrorTacker #80

mahi8514 opened this issue May 31, 2020 · 1 comment

Comments

@mahi8514
Copy link

HI,
First to say, this an awesome project which focus on Clean Architecture and my main reference. Now i am on a Combine project and requires ActivityIndicator and ErrorTracker on Combine Version.

@mahi8514
Copy link
Author

I have created an extension for Publisher like this

public extension Publisher where Failure: Error { func trackError(errorss: PassthroughSubject<Error, Never>) -> AnyPublisher<Output, Failure> { return handleEvents(receiveCompletion: { completion in if case let .failure(error) = completion { errorss.send(error) } }).eraseToAnyPublisher() } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant