mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
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:
+3
-1
@@ -11,6 +11,7 @@ import com.squareup.anvil.annotations.ContributesBinding
|
||||
import io.element.android.libraries.core.log.logger.LoggerTag
|
||||
import io.element.android.libraries.di.AppScope
|
||||
import io.element.android.libraries.di.SingleIn
|
||||
import io.element.android.libraries.di.annotations.AppCoroutineScope
|
||||
import io.element.android.libraries.matrix.api.core.RoomId
|
||||
import io.element.android.libraries.matrix.api.core.SessionId
|
||||
import io.element.android.libraries.matrix.api.core.SpaceId
|
||||
@@ -36,7 +37,8 @@ private val loggerTag = LoggerTag("Navigation")
|
||||
@SingleIn(AppScope::class)
|
||||
class DefaultAppNavigationStateService @Inject constructor(
|
||||
private val appForegroundStateService: AppForegroundStateService,
|
||||
private val coroutineScope: CoroutineScope,
|
||||
@AppCoroutineScope
|
||||
coroutineScope: CoroutineScope,
|
||||
) : AppNavigationStateService {
|
||||
private val state = MutableStateFlow(
|
||||
AppNavigationState(
|
||||
|
||||
Reference in New Issue
Block a user