Not long ago I created some Operators analogous to doOnNext(), doOnError(), and doOnCompleted() except it would provide the emission counts and be able to use them for side effects.
This could be helpful for providing UI status updates through a side effect showing the number of items processed.
val mySource = Observable.just("Alpha","Beta","Gamma")
mySource.doOnNextCount { println("$it items processed")}.subscribe()
If I go forward with this, then the next question is should there be FX and non-FX version... I'm going to guess yes. I'll think about it over the next few days.
Not long ago I created some Operators analogous to
doOnNext()
,doOnError()
, anddoOnCompleted()
except it would provide the emission counts and be able to use them for side effects.This could be helpful for providing UI status updates through a side effect showing the number of items processed.
OUTPUT
If I go forward with this, then the next question is should there be FX and non-FX version... I'm going to guess yes. I'll think about it over the next few days.