aboutsummaryrefslogtreecommitdiff
path: root/src/background/repositories/LocalSettingRepository.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/repositories/LocalSettingRepository.ts')
-rw-r--r--src/background/repositories/LocalSettingRepository.ts24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/background/repositories/LocalSettingRepository.ts b/src/background/repositories/LocalSettingRepository.ts
deleted file mode 100644
index 0c9ef3b..0000000
--- a/src/background/repositories/LocalSettingRepository.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { injectable } from 'tsyringe';
-import SettingData from '../../shared/SettingData';
-
-@injectable()
-export default class LocalSettingRepository {
- async load(): Promise<SettingData | null> {
- const {settings} = await browser.storage.local.get('settings');
- if (!settings) {
- return null;
- }
- return SettingData.fromJSON(settings as any);
- }
-
- onChange(callback: () => void) {
- browser.storage.onChanged.addListener((changes, area) => {
- if (area !== 'local') {
- return;
- }
- if (changes.settings) {
- callback();
- }
- });
- }
-}