diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-05-06 22:47:58 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-05-06 22:47:58 +0900 |
commit | 6d057a974bb42406259b6f0b0a8c0b1e22335073 (patch) | |
tree | 9a299d7f54e141eb2b851bbca787007ce533df92 /src/content/components | |
parent | 129aae38df1a17a5850898d5832bb8112ead3cbb (diff) |
Toggle add-on enabled by clicking indicator
Diffstat (limited to 'src/content/components')
-rw-r--r-- | src/content/components/common/index.js | 5 |
1 files changed, 4 insertions, 1 deletions
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()); } } |