Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZherebtsovAlexandr/fbdf4fc93c389bbda071e88f74396fd5 to your computer and use it in GitHub Desktop.
Save ZherebtsovAlexandr/fbdf4fc93c389bbda071e88f74396fd5 to your computer and use it in GitHub Desktop.
GetEventDetailsInteractorImpl
public class GetEventDetailsInteractorImpl extends GetEventDetailsInteractor {
private final EventDataProvider eventDataProvider;
public GetEventDetailsInteractorImpl(int eventId,
ThreadExecutor threadExecutor,
PostExecutionThread postExecutionThread,
EventDataProvider eventDataProvider) {
super(threadExecutor, postExecutionThread);
this.eventDataProvider = eventDataProvider;
}
@Override
protected Observable buildUseCaseObservable() {
return eventDataProvider.getEventByIdLocal(this.eventId)
.mergeWith(
eventDataProvider.getEventByIdRemote(this.eventId)
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment