Skip to content

Commit 6cbd692

Browse files
authored
Merge pull request #60 from headlines-toolkit/fix_bugs
Fix bugs
2 parents bbf5668 + d8fe0f6 commit 6cbd692

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

lib/app/bloc/app_bloc.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,9 @@ class AppBloc extends Bloc<AppEvent, AppState> {
432432
);
433433

434434
try {
435-
final appConfig = await _appConfigRepository.read(id: 'app_config');
435+
final remoteConfig = await _appConfigRepository.read(id: kRemoteConfigId);
436436
print(
437-
'[AppBloc] AppConfig fetched successfully. ID: ${appConfig.id} for user: ${state.user!.id}',
437+
'[AppBloc] Remote Config fetched successfully. ID: ${remoteConfig.id} for user: ${state.user!.id}',
438438
);
439439

440440
// Determine the correct status based on the existing user's role.
@@ -444,7 +444,10 @@ class AppBloc extends Bloc<AppEvent, AppState> {
444444
? AppStatus.authenticated
445445
: AppStatus.anonymous;
446446
emit(
447-
state.copyWith(remoteConfig: appConfig, status: newStatusBasedOnUser),
447+
state.copyWith(
448+
remoteConfig: remoteConfig,
449+
status: newStatusBasedOnUser,
450+
),
448451
);
449452
} on HtHttpException catch (e) {
450453
print(

lib/bootstrap.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ Future<Widget> bootstrap(
4444
httpClient = HtHttpClient(
4545
baseUrl: appConfig.baseUrl,
4646
tokenProvider: () => authenticationRepository.getAuthToken(),
47-
isWeb: kIsWeb,
4847
logger: logger,
4948
);
5049
authClient = HtAuthApi(httpClient: httpClient);

pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ packages:
434434
description:
435435
path: "."
436436
ref: HEAD
437-
resolved-ref: "6484a5641c3d633d286ea5848c5b7cf1e723ebc1"
437+
resolved-ref: "3c50cd082406d4cacafe60ad097ba6fa6ba891eb"
438438
url: "https://github.com/headlines-toolkit/ht-http-client.git"
439439
source: git
440440
version: "0.0.0"

0 commit comments

Comments
 (0)