My First Clean Architecture

This commit is contained in:
Shin'ya Ueoka 2018-07-20 23:36:03 +09:00
parent 4d4aaa2c4b
commit bf7c125fb2
8 changed files with 185 additions and 3 deletions

View file

@ -3,7 +3,6 @@ import * as commandActions from 'background/actions/command';
import * as settingActions from 'background/actions/setting';
import * as findActions from 'background/actions/find';
import * as tabActions from 'background/actions/tab';
import * as completions from '../shared/completions';
export default class BackgroundComponent {
constructor(store) {
@ -41,8 +40,6 @@ export default class BackgroundComponent {
return this.broadcastSettingsChanged();
case messages.SETTINGS_QUERY:
return Promise.resolve(this.store.getState().setting.value);
case messages.CONSOLE_QUERY_COMPLETIONS:
return completions.complete(message.text, settings.value);
case messages.SETTINGS_RELOAD:
this.store.dispatch(settingActions.load());
return this.broadcastSettingsChanged();