aboutsummaryrefslogtreecommitdiff
path: root/src/background/controllers/SettingController.js
blob: e895d726b3a20e2d5318af08cfb2777243b0f1cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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();
  }
}