aboutsummaryrefslogtreecommitdiff
path: root/src/content/components/top-content
diff options
context:
space:
mode:
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) {