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

@ -1,7 +1,6 @@
package com.keylesspalace.tusky.settings
import androidx.preference.PreferenceDataStore
import com.keylesspalace.tusky.appstore.EventHub
import com.keylesspalace.tusky.appstore.PreferenceChangedEvent
import com.keylesspalace.tusky.db.AccountEntity
import com.keylesspalace.tusky.db.AccountManager
@ -9,7 +8,7 @@ import com.keylesspalace.tusky.db.AccountManager
class AccountPreferenceHandler(
private val account: AccountEntity,
private val accountManager: AccountManager,
private val eventHub: EventHub
private val dispatchEvent: (PreferenceChangedEvent) -> Unit
) : PreferenceDataStore() {
override fun getBoolean(key: String, defValue: Boolean): Boolean {
@ -30,6 +29,6 @@ class AccountPreferenceHandler(
accountManager.saveAccount(account)
eventHub.dispatch(PreferenceChangedEvent(key))
dispatchEvent(PreferenceChangedEvent(key))
}
}