Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- interface PushUpdates {
- val jobs: Observable<Job>
- }
- class SubscribedJobRepository(
- private val delegate: JobRepository,
- private val pushUpdates: PushUpdates
- ) : JobRepository by delegate {
- override fun getJob(jobId: String): Observable<Job> {
- return delegate.getJob(jobId)
- .concatWith(pushUpdates.jobs.filter {
- it.id == jobId
- })
- }
- }
Add Comment
Please, Sign In to add comment