remove Rx from AccountViewModel and ReportViewModel (#3463)

This commit is contained in:
Konrad Pozniak 2023-03-22 22:00:03 +01:00 committed by GitHub
commit 787f88b801
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 146 additions and 174 deletions

View file

@ -1,18 +0,0 @@
package com.keylesspalace.tusky.util
import androidx.annotation.CallSuper
import androidx.lifecycle.ViewModel
import io.reactivex.rxjava3.disposables.CompositeDisposable
import io.reactivex.rxjava3.disposables.Disposable
open class RxAwareViewModel : ViewModel() {
private val disposables = CompositeDisposable()
fun Disposable.autoDispose() = disposables.add(this)
@CallSuper
override fun onCleared() {
super.onCleared()
disposables.clear()
}
}