From 2f0f7143b58818946f9a926abb1f8b1ff0b30889 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Mon, 6 Jun 2022 17:20:36 +0530 Subject: [PATCH] Simplify code --- src/domain/session/settings/SettingsViewModel.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/domain/session/settings/SettingsViewModel.js b/src/domain/session/settings/SettingsViewModel.js index bf05c9ec..eed18953 100644 --- a/src/domain/session/settings/SettingsViewModel.js +++ b/src/domain/session/settings/SettingsViewModel.js @@ -183,13 +183,7 @@ export class SettingsViewModel extends ViewModel { } changeThemeOption(themeName, themeVariant) { - if (themeName && "id" in this.themeMapping[themeName]) { - this.platform.themeLoader.setTheme(themeName); - } - else { - this.platform.themeLoader.setTheme(themeName, themeVariant); - } - // if there's no themeId, then the theme is going to be set via radio-buttons + this.platform.themeLoader.setTheme(themeName, themeVariant); // emit so that radio-buttons become displayed/hidden this.emitChange("themeOption"); }