Fix coroutine scope (#4820)
* Inject the session scope instead of the application scope where it's possible. * Create AppCoroutineScope annotation to let developers explicitly choose the appropriate CoroutineScope when injecting one.
This commit is contained in:
parent
36c7c7ab9b
commit
5f191d9f9c
58 changed files with 172 additions and 72 deletions
|
|
@ -9,6 +9,7 @@ package io.element.android.libraries.matrix.impl
|
|||
|
||||
import io.element.android.libraries.core.coroutine.CoroutineDispatchers
|
||||
import io.element.android.libraries.di.CacheDirectory
|
||||
import io.element.android.libraries.di.annotations.AppCoroutineScope
|
||||
import io.element.android.libraries.featureflag.api.FeatureFlagService
|
||||
import io.element.android.libraries.featureflag.api.FeatureFlags
|
||||
import io.element.android.libraries.matrix.impl.analytics.UtdTracker
|
||||
|
|
@ -40,6 +41,7 @@ import javax.inject.Inject
|
|||
class RustMatrixClientFactory @Inject constructor(
|
||||
private val baseDirectory: File,
|
||||
@CacheDirectory private val cacheDirectory: File,
|
||||
@AppCoroutineScope
|
||||
private val appCoroutineScope: CoroutineScope,
|
||||
private val coroutineDispatchers: CoroutineDispatchers,
|
||||
private val sessionStore: SessionStore,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue