JakeWharton / RxReplayingShare

An RxJava transformer which combines replay(1), publish(), and refCount() operators.
Apache License 2.0
626 stars 28 forks source link

Default value #34

Closed oldergod closed 5 years ago

oldergod commented 5 years ago

That's be dope to get a default value, kind of a startWith that would be executed only once in the lifetime of the replayingShare().

Right now, say I have

api.doStuff()
  .startWith(defaultData)
  .replayingShare()

the defaultData will be emitted for all new first subscriber.

oldergod commented 5 years ago

I indent to push a PR for that

replayingShare(startWith = T) sounds nice.