Guest User

Untitled

a guest
Jun 20th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. interface PushUpdates {
  2.  
  3. val jobs: Observable<Job>
  4.  
  5. }
  6.  
  7. class SubscribedJobRepository(
  8. private val delegate: JobRepository,
  9. private val pushUpdates: PushUpdates
  10. ) : JobRepository by delegate {
  11.  
  12. override fun getJob(jobId: String): Observable<Job> {
  13. return delegate.getJob(jobId)
  14. .concatWith(pushUpdates.jobs.filter {
  15. it.id == jobId
  16. })
  17. }
  18.  
  19. }
Add Comment
Please, Sign In to add comment