AutoDisposable for RxJava with Lifecycle Architecture Component
AnhVu
1393

One little trick I like is using the ‘plusAssign’ operator. You could add this method to your AutoDisposable :

operator fun plusAssign(disposable: Disposable) = add(disposable)

With that, you can write :

autoDisposable += observable.subscribe(observer)