Cleanup
This commit is contained in:
parent
820531120a
commit
2a3694d8b7
|
@ -29,7 +29,6 @@ import im.vector.app.core.extensions.toggle
|
||||||
import im.vector.app.core.platform.VectorViewModel
|
import im.vector.app.core.platform.VectorViewModel
|
||||||
import io.reactivex.Single
|
import io.reactivex.Single
|
||||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||||
import io.reactivex.disposables.Disposable
|
|
||||||
import org.matrix.android.sdk.api.MatrixPatterns
|
import org.matrix.android.sdk.api.MatrixPatterns
|
||||||
import org.matrix.android.sdk.api.session.Session
|
import org.matrix.android.sdk.api.session.Session
|
||||||
import org.matrix.android.sdk.api.session.profile.ProfileService
|
import org.matrix.android.sdk.api.session.profile.ProfileService
|
||||||
|
@ -50,8 +49,6 @@ class UserListViewModel @AssistedInject constructor(@Assisted initialState: User
|
||||||
private val knownUsersSearch = BehaviorRelay.create<KnownUsersSearch>()
|
private val knownUsersSearch = BehaviorRelay.create<KnownUsersSearch>()
|
||||||
private val directoryUsersSearch = BehaviorRelay.create<DirectoryUsersSearch>()
|
private val directoryUsersSearch = BehaviorRelay.create<DirectoryUsersSearch>()
|
||||||
|
|
||||||
private var currentUserSearchDisposable: Disposable? = null
|
|
||||||
|
|
||||||
@AssistedFactory
|
@AssistedFactory
|
||||||
interface Factory {
|
interface Factory {
|
||||||
fun create(initialState: UserListViewState): UserListViewModel
|
fun create(initialState: UserListViewState): UserListViewModel
|
||||||
|
@ -115,8 +112,6 @@ class UserListViewModel @AssistedInject constructor(@Assisted initialState: User
|
||||||
copy(knownUsers = async)
|
copy(knownUsers = async)
|
||||||
}
|
}
|
||||||
|
|
||||||
currentUserSearchDisposable?.dispose()
|
|
||||||
|
|
||||||
directoryUsersSearch
|
directoryUsersSearch
|
||||||
.debounce(300, TimeUnit.MILLISECONDS)
|
.debounce(300, TimeUnit.MILLISECONDS)
|
||||||
.switchMapSingle { search ->
|
.switchMapSingle { search ->
|
||||||
|
|
Loading…
Reference in New Issue