mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-02-02 07:31:38 +01:00
Simplify code
This commit is contained in:
parent
0dac00f327
commit
2f0f7143b5
@ -183,13 +183,7 @@ export class SettingsViewModel extends ViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
changeThemeOption(themeName, themeVariant) {
|
changeThemeOption(themeName, themeVariant) {
|
||||||
if (themeName && "id" in this.themeMapping[themeName]) {
|
this.platform.themeLoader.setTheme(themeName, themeVariant);
|
||||||
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
|
|
||||||
// emit so that radio-buttons become displayed/hidden
|
// emit so that radio-buttons become displayed/hidden
|
||||||
this.emitChange("themeOption");
|
this.emitChange("themeOption");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user