Settings as clean architecture
This commit is contained in:
parent
0652131de8
commit
89c28d67fd
11 changed files with 176 additions and 33 deletions
18
src/background/controllers/setting.js
Normal file
18
src/background/controllers/setting.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
import SettingInteractor from '../usecases/setting';
|
||||
import ContentMessageClient from '../infrastructures/content-message-client';
|
||||
|
||||
export default class SettingController {
|
||||
constructor() {
|
||||
this.settingInteractor = new SettingInteractor();
|
||||
this.contentMessageClient = new ContentMessageClient();
|
||||
}
|
||||
|
||||
getSetting() {
|
||||
return this.settingInteractor.get();
|
||||
}
|
||||
|
||||
async reload() {
|
||||
await this.settingInteractor.reload();
|
||||
this.contentMessageClient.broadcastSettingsChanged();
|
||||
}
|
||||
}
|
Reference in a new issue