diff --git a/lib/app/bloc/app_bloc.dart b/lib/app/bloc/app_bloc.dart index 7511698..a26ae9c 100644 --- a/lib/app/bloc/app_bloc.dart +++ b/lib/app/bloc/app_bloc.dart @@ -432,9 +432,9 @@ class AppBloc extends Bloc { ); try { - final appConfig = await _appConfigRepository.read(id: 'app_config'); + final remoteConfig = await _appConfigRepository.read(id: kRemoteConfigId); print( - '[AppBloc] AppConfig fetched successfully. ID: ${appConfig.id} for user: ${state.user!.id}', + '[AppBloc] Remote Config fetched successfully. ID: ${remoteConfig.id} for user: ${state.user!.id}', ); // Determine the correct status based on the existing user's role. @@ -444,7 +444,10 @@ class AppBloc extends Bloc { ? AppStatus.authenticated : AppStatus.anonymous; emit( - state.copyWith(remoteConfig: appConfig, status: newStatusBasedOnUser), + state.copyWith( + remoteConfig: remoteConfig, + status: newStatusBasedOnUser, + ), ); } on HtHttpException catch (e) { print( diff --git a/lib/bootstrap.dart b/lib/bootstrap.dart index cbc7f2b..c44323d 100644 --- a/lib/bootstrap.dart +++ b/lib/bootstrap.dart @@ -44,7 +44,6 @@ Future bootstrap( httpClient = HtHttpClient( baseUrl: appConfig.baseUrl, tokenProvider: () => authenticationRepository.getAuthToken(), - isWeb: kIsWeb, logger: logger, ); authClient = HtAuthApi(httpClient: httpClient); diff --git a/pubspec.lock b/pubspec.lock index 88ec534..a0790ec 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -434,7 +434,7 @@ packages: description: path: "." ref: HEAD - resolved-ref: "6484a5641c3d633d286ea5848c5b7cf1e723ebc1" + resolved-ref: "3c50cd082406d4cacafe60ad097ba6fa6ba891eb" url: "https://github.com/headlines-toolkit/ht-http-client.git" source: git version: "0.0.0"