Is there any built-in way to combine two or more DisposeBag
s merging them in a single one which triggers as soon as the first trigger?
The use case is something like this: I have a UIViewController
with some controls and his own disposeBag; then I have a library which asynchronously hands some data to this UIViewController
. This data comes with his own disposeBag, which is bound to some independent logic (network connections basically). I want to bind the data to the controls, and dispose the binding as soon as one of the two DisposeBag is triggered.
I haven't tried it before, but try
CompositeDisposable
.