Completed the comments to the onCleared function

This commit is contained in:
Nelson R. Perez 2019-02-04 21:02:41 -05:00
parent 35561059ce
commit c285bf6da7

View file

@ -150,7 +150,8 @@ class TransferRepository internal constructor(context: Context) {
* Called whenever the disposables have to be cleared. * Called whenever the disposables have to be cleared.
* *
* Since this repository manages a subscription it is necessary to clear the disposable after we're done with it. * Since this repository manages a subscription it is necessary to clear the disposable after we're done with it.
* The parent ViewModel will let us know when that * The parent ViewModel will let us know when that subscription is no longer necessary and the resources can
* be cleared.
*/ */
fun onCleared() { fun onCleared() {
if(!compositeDisposable.isDisposed) if(!compositeDisposable.isDisposed)