Skip to content

Commit

Permalink
Make sure we trigger the lang. change in the elements bloc
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed May 12, 2021
1 parent 132676a commit d57bfbc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/application/main/main_bloc.dart
Expand Up @@ -29,6 +29,7 @@ class MainBloc extends Bloc<MainEvent, MainState> {
final WeaponsBloc _weaponsBloc;
final HomeBloc _homeBloc;
final ArtifactsBloc _artifactsBloc;
final ElementsBloc _elementsBloc;

MainBloc(
this._logger,
Expand All @@ -41,6 +42,7 @@ class MainBloc extends Bloc<MainEvent, MainState> {
this._weaponsBloc,
this._homeBloc,
this._artifactsBloc,
this._elementsBloc,
) : super(const MainState.loading());

_MainLoadedState get currentState => state as _MainLoadedState;
Expand Down Expand Up @@ -69,6 +71,7 @@ class MainBloc extends Bloc<MainEvent, MainState> {
_weaponsBloc.add(const WeaponsEvent.init());
_homeBloc.add(const HomeEvent.init());
_artifactsBloc.add(const ArtifactsEvent.init());
_elementsBloc.add(const ElementsEvent.init());
}

final settings = _settingsService.appSettings;
Expand Down
1 change: 1 addition & 0 deletions lib/main.dart
Expand Up @@ -127,6 +127,7 @@ class MyApp extends StatelessWidget {
ctx.read<WeaponsBloc>(),
ctx.read<HomeBloc>(),
ctx.read<ArtifactsBloc>(),
ctx.read<ElementsBloc>(),
)..add(const MainEvent.init());
},
),
Expand Down

0 comments on commit d57bfbc

Please sign in to comment.