Skip to content

Commit

Permalink
[Application] Removed not needed param
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed Mar 8, 2022
1 parent 271e2b2 commit 8d13644
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/application/main/main_bloc.dart
Expand Up @@ -52,10 +52,10 @@ class MainBloc extends Bloc<MainEvent, MainState> {
Stream<MainState> mapEventToState(MainEvent event) async* {
final s = await event.when(
init: () async => _init(init: true),
themeChanged: (theme) async => _loadThemeData(theme, _settingsService.useDarkAmoledTheme, _settingsService.accentColor),
accentColorChanged: (accentColor) async => _loadThemeData(_settingsService.appTheme, _settingsService.useDarkAmoledTheme, accentColor),
themeChanged: (theme) async => _loadThemeData(theme, _settingsService.accentColor),
accentColorChanged: (accentColor) async => _loadThemeData(_settingsService.appTheme, accentColor),
languageChanged: (language) async => _init(languageChanged: true),
useDarkAmoledThemeChanged: (use) async => _loadThemeData(_settingsService.appTheme, use, _settingsService.accentColor),
useDarkAmoledThemeChanged: (use) async => _loadThemeData(_settingsService.appTheme, _settingsService.accentColor),
);
yield s;
}
Expand All @@ -75,7 +75,7 @@ class MainBloc extends Bloc<MainEvent, MainState> {
final settings = _settingsService.appSettings;
await _telemetryService.trackInit(settings);

final state = _loadThemeData(settings.appTheme, settings.useDarkAmoled, settings.accentColor);
final state = _loadThemeData(settings.appTheme, settings.accentColor);

if (init) {
await Future.delayed(const Duration(milliseconds: 250));
Expand All @@ -86,7 +86,6 @@ class MainBloc extends Bloc<MainEvent, MainState> {

Future<MainState> _loadThemeData(
AppThemeType theme,
bool useDarkAmoledTheme,
AppAccentColorType accentColor, {
bool isInitialized = true,
}) async {
Expand Down

0 comments on commit 8d13644

Please sign in to comment.