Make method name a verb

This commit is contained in:
RMidhunSuresh 2022-05-30 12:02:35 +05:30
parent e3235ea3eb
commit efb1a67470
2 changed files with 3 additions and 3 deletions

View file

@ -186,7 +186,7 @@ export class SettingsViewModel extends ViewModel {
}
}
themeOptionChanged(themeId) {
changeThemeOption(themeId) {
if (themeId) {
this.setTheme(themeId);
}

View file

@ -158,13 +158,13 @@ export class SettingsView extends TemplateView {
}
optionTags.push( t.option({ value: details.id ?? "", selected: isSelected} , name));
}
const select = t.select({ onChange: (e) => vm.themeOptionChanged(e.target.value) }, optionTags);
const select = t.select({ onChange: (e) => vm.changeThemeOption(e.target.value) }, optionTags);
const radioButtons = t.form({
className: { hidden: () => select.options[select.selectedIndex].value !== "" },
onChange: (e) => {
const selectedThemeName = select.options[select.selectedIndex].text;
const themeId = vm.themeMapping[selectedThemeName][e.target.value].id;
vm.themeOptionChanged(themeId);
vm.changeThemeOption(themeId);
}
},
[