diff options
Diffstat (limited to 'src/background/controllers/SettingController.ts')
-rw-r--r-- | src/background/controllers/SettingController.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/background/controllers/SettingController.ts b/src/background/controllers/SettingController.ts new file mode 100644 index 0000000..e895d72 --- /dev/null +++ b/src/background/controllers/SettingController.ts @@ -0,0 +1,18 @@ +import SettingUseCase from '../usecases/SettingUseCase'; +import ContentMessageClient from '../infrastructures/ContentMessageClient'; + +export default class SettingController { + constructor() { + this.settingUseCase = new SettingUseCase(); + this.contentMessageClient = new ContentMessageClient(); + } + + getSetting() { + return this.settingUseCase.get(); + } + + async reload() { + await this.settingUseCase.reload(); + this.contentMessageClient.broadcastSettingsChanged(); + } +} |