refactored access to options on frontend

This commit is contained in:
zadam
2020-02-05 22:08:45 +01:00
parent 786bbbc160
commit 42017fde5f
32 changed files with 267 additions and 311 deletions

View File

@@ -1,5 +1,5 @@
import BasicWidget from "./basic_widget.js";
import optionService from "../services/options.js";
import options from "../services/options.js";
export default class SidePaneContainer extends BasicWidget {
constructor(appContext, side, widgets) {
@@ -19,9 +19,7 @@ export default class SidePaneContainer extends BasicWidget {
return this.$widget;
}
async eventReceived(name, data, sync = false) {
const options = await optionService.waitForOptions();
eventReceived(name, data, sync = false) {
if (options.is(this.side + 'PaneVisible')) {
super.eventReceived(name, data, sync);
}