From 21f51c90ad17d69107e784298a3ed28d26a53a22 Mon Sep 17 00:00:00 2001 From: Brian Yencho Date: Wed, 20 Dec 2023 10:06:18 -0600 Subject: [PATCH] Update scope to use Unconfined (#421) --- .../data/platform/manager/NetworkConfigManagerImpl.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/x8bit/bitwarden/data/platform/manager/NetworkConfigManagerImpl.kt b/app/src/main/java/com/x8bit/bitwarden/data/platform/manager/NetworkConfigManagerImpl.kt index 868f205a4..f78ff2a6f 100644 --- a/app/src/main/java/com/x8bit/bitwarden/data/platform/manager/NetworkConfigManagerImpl.kt +++ b/app/src/main/java/com/x8bit/bitwarden/data/platform/manager/NetworkConfigManagerImpl.kt @@ -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 }