From 6d057a974bb42406259b6f0b0a8c0b1e22335073 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 6 May 2018 22:47:58 +0900 Subject: Toggle add-on enabled by clicking indicator --- src/content/components/common/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/content/components/common') diff --git a/src/content/components/common/index.js b/src/content/components/common/index.js index c5d1df7..c76a7d9 100644 --- a/src/content/components/common/index.js +++ b/src/content/components/common/index.js @@ -3,6 +3,7 @@ import KeymapperComponent from './keymapper'; import FollowComponent from './follow'; import * as settingActions from 'content/actions/setting'; import messages from 'shared/messages'; +import * as addonActions from '../../actions/addon'; export default class Common { constructor(win, store) { @@ -25,7 +26,9 @@ export default class Common { onMessage(message) { switch (message.type) { case messages.SETTINGS_CHANGED: - this.reloadSettings(); + return this.reloadSettings(); + case messages.ADDON_TOGGLE_ENABLED: + return this.store.dispatch(addonActions.toggleEnabled()); } } -- cgit v1.2.3