Remove Rx from EventHub and TimelineCases (#3446)

* remove Rx from EventHub and TimelineCases

* fix tests

* fix AccountViewModel.unblockDomain

* remove debug logging
This commit is contained in:
Konrad Pozniak 2023-03-18 10:11:47 +01:00 committed by GitHub
commit 321d17f5de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 264 additions and 330 deletions

View file

@ -28,7 +28,6 @@ import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.filterIsInstance
import kotlinx.coroutines.launch
import kotlinx.coroutines.rx3.asFlow
import okio.IOException
import javax.inject.Inject
@ -55,7 +54,7 @@ class TrendingViewModel @Inject constructor(
// or deleted. Unfortunately, there's nothing in the event to determine if it's a filter
// that was modified, so refresh on every preference change.
viewModelScope.launch {
eventHub.events.asFlow()
eventHub.events
.filterIsInstance<PreferenceChangedEvent>()
.collect {
invalidate()