aboutsummaryrefslogtreecommitdiff
path: root/src/content/components/top-content
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-10-28 14:10:46 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-10-31 19:34:32 +0900
commit24c736945126625c6e099d6062bcd51a0c967e68 (patch)
tree543519ba36e4cd10cae66d2e31efd94825f84e36 /src/content/components/top-content
parentc4996ef5d8d5d85f49732bb01b6da13b66ea81d5 (diff)
Remove update propagation
Diffstat (limited to 'src/content/components/top-content')
-rw-r--r--src/content/components/top-content/follow-controller.js4
-rw-r--r--src/content/components/top-content/index.js9
2 files changed, 7 insertions, 6 deletions
diff --git a/src/content/components/top-content/follow-controller.js b/src/content/components/top-content/follow-controller.js
index 7570cf8..a87ecc7 100644
--- a/src/content/components/top-content/follow-controller.js
+++ b/src/content/components/top-content/follow-controller.js
@@ -19,6 +19,10 @@ export default class FollowController {
this.producer = null;
messages.onMessage(this.onMessage.bind(this));
+
+ store.subscribe(() => {
+ this.update();
+ });
}
onMessage(message, sender) {
diff --git a/src/content/components/top-content/index.js b/src/content/components/top-content/index.js
index c4a8461..f6afbfa 100644
--- a/src/content/components/top-content/index.js
+++ b/src/content/components/top-content/index.js
@@ -9,13 +9,12 @@ export default class TopContent {
constructor(win, store) {
this.win = win;
- this.children = [
- new CommonComponent(win, store),
- new FollowController(win, store),
- ];
this.store = store;
this.prevBlacklist = undefined;
+ new CommonComponent(win, store); // eslint-disable-line no-new
+ new FollowController(win, store); // eslint-disable-line no-new
+
// TODO make component
consoleFrames.initialize(this.win.document);
@@ -28,8 +27,6 @@ export default class TopContent {
this.disableIfBlack(blacklist);
this.prevBlacklist = blacklist;
}
-
- this.children.forEach(c => c.update());
}
disableIfBlack(blacklist) {