|
|
@ -3,6 +3,7 @@ import KeymapperComponent from './keymapper'; |
|
|
|
import FollowComponent from './follow'; |
|
|
|
import FollowComponent from './follow'; |
|
|
|
import * as settingActions from 'content/actions/setting'; |
|
|
|
import * as settingActions from 'content/actions/setting'; |
|
|
|
import messages from 'shared/messages'; |
|
|
|
import messages from 'shared/messages'; |
|
|
|
|
|
|
|
import * as addonActions from '../../actions/addon'; |
|
|
|
|
|
|
|
|
|
|
|
export default class Common { |
|
|
|
export default class Common { |
|
|
|
constructor(win, store) { |
|
|
|
constructor(win, store) { |
|
|
@ -25,7 +26,9 @@ export default class Common { |
|
|
|
onMessage(message) { |
|
|
|
onMessage(message) { |
|
|
|
switch (message.type) { |
|
|
|
switch (message.type) { |
|
|
|
case messages.SETTINGS_CHANGED: |
|
|
|
case messages.SETTINGS_CHANGED: |
|
|
|
this.reloadSettings(); |
|
|
|
return this.reloadSettings(); |
|
|
|
|
|
|
|
case messages.ADDON_TOGGLE_ENABLED: |
|
|
|
|
|
|
|
return this.store.dispatch(addonActions.toggleEnabled()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|