remove message propagation

This commit is contained in:
Shin'ya Ueoka 2017-10-18 22:04:30 +09:00
parent 86431e82f7
commit 903c9c78b7
8 changed files with 37 additions and 22 deletions

View file

@ -21,18 +21,19 @@ export default class Common {
];
this.reloadSettings();
messages.onMessage(this.onMessage.bind(this));
}
update() {
this.children.forEach(c => c.update());
}
onMessage(message, sender) {
onMessage(message) {
switch (message.type) {
case messages.SETTINGS_CHANGED:
this.reloadSettings();
}
this.children.forEach(c => c.onMessage(message, sender));
}
reloadSettings() {