Rx View Model
Base class for a view model that stores a CompositeDisposable of all active subscriptions and destroys them on AndroidViewModel.onCleared
Functions
Caches the Completable and subscribes to it. The Completable will return it's result for any later subscriber as long as the ViewModel is alive (until the ViewModels onCleared method is called).
Caches the Maybe and subscribes to it. The Maybe will return it's result for any later subscriber as long as the ViewModel is alive (until the ViewModels onCleared method is called).
Caches the Single and subscribes to it. The Single will return it's result for any later subscriber as long as the ViewModel is alive (until the ViewModels onCleared method is called).
Applies a replay(1).refCount() to the Flowable and subscribes to it. The Flowable will be alive as long as the ViewModel is alive (until the ViewModels onCleared method is called).
Applies a replay(1).refCount() to the Observable and subscribes to it. The Observable will be alive as long as the ViewModel is alive (until the ViewModels onCleared method is called).