Update scope to use Unconfined (#421)

This commit is contained in:
Brian Yencho
2024-06-20 17:08:07 +01:00
committed by Álison Fernandes
parent 6f85a6eb75
commit 21f51c90ad
@@ -23,7 +23,7 @@ class NetworkConfigManagerImpl(
dispatcherManager: DispatcherManager,
) : NetworkConfigManager {
private val scope = CoroutineScope(dispatcherManager.io)
private val collectionScope = CoroutineScope(dispatcherManager.unconfined)
init {
authRepository
@@ -35,14 +35,14 @@ class NetworkConfigManagerImpl(
is AuthState.Uninitialized -> null
}
}
.launchIn(scope)
.launchIn(collectionScope)
environmentRepository
.environmentStateFlow
.onEach { environment ->
baseUrlInterceptors.environment = environment
}
.launchIn(scope)
.launchIn(collectionScope)
refreshAuthenticator.authenticatorProvider = authRepository
}