Cleanup .bind(

This commit is contained in:
djmaze 2021-04-23 10:47:24 +02:00
parent 9ec84baa32
commit 29fe73d4e7
7 changed files with 143 additions and 246 deletions

View file

@ -14,8 +14,6 @@ class PluginPopupView extends AbstractViewPopup {
constructor() {
super('Plugin');
this.onPluginSettingsUpdateResponse = this.onPluginSettingsUpdateResponse.bind(this);
this.addObservables({
saveError: '',
name: '',
@ -50,15 +48,11 @@ class PluginPopupView extends AbstractViewPopup {
});
this.saveError('');
Remote.pluginSettingsUpdate(this.onPluginSettingsUpdateResponse, list);
}
onPluginSettingsUpdateResponse(iError) {
if (iError) {
this.saveError(getNotification(iError));
} else {
this.cancelCommand();
}
Remote.pluginSettingsUpdate(iError =>
iError
? this.saveError(getNotification(iError))
: this.cancelCommand()
, list);
}
onShow(oPlugin) {