From 0dec6c641fc11348f89a12680a087ccda1181f66 Mon Sep 17 00:00:00 2001
From: Shin'ya UEOKA <ueokande@i-beam.org>
Date: Sat, 5 Oct 2019 07:19:48 +0000
Subject: Make Settings class

---
 src/content/client/SettingClient.ts           | 4 ++--
 src/content/repositories/SettingRepository.ts | 2 +-
 src/content/usecases/SettingUseCase.ts        | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/content')

diff --git a/src/content/client/SettingClient.ts b/src/content/client/SettingClient.ts
index a7cd1ee..fc62720 100644
--- a/src/content/client/SettingClient.ts
+++ b/src/content/client/SettingClient.ts
@@ -1,4 +1,4 @@
-import Settings, { valueOf } from '../../shared/Settings';
+import Settings from '../../shared/settings/Settings';
 import * as messages from '../../shared/messages';
 
 export default interface SettingClient {
@@ -10,6 +10,6 @@ export class SettingClientImpl {
     let settings = await browser.runtime.sendMessage({
       type: messages.SETTINGS_QUERY,
     });
-    return valueOf(settings);
+    return Settings.fromJSON(settings);
   }
 }
diff --git a/src/content/repositories/SettingRepository.ts b/src/content/repositories/SettingRepository.ts
index d718794..4ba26e0 100644
--- a/src/content/repositories/SettingRepository.ts
+++ b/src/content/repositories/SettingRepository.ts
@@ -1,4 +1,4 @@
-import Settings, { DefaultSetting } from '../../shared/Settings';
+import Settings, { DefaultSetting } from '../../shared/settings/Settings';
 
 let current: Settings = DefaultSetting;
 
diff --git a/src/content/usecases/SettingUseCase.ts b/src/content/usecases/SettingUseCase.ts
index d5f66c6..4608039 100644
--- a/src/content/usecases/SettingUseCase.ts
+++ b/src/content/usecases/SettingUseCase.ts
@@ -1,7 +1,7 @@
 import { injectable, inject } from 'tsyringe';
 import SettingRepository from '../repositories/SettingRepository';
 import SettingClient from '../client/SettingClient';
-import Settings from '../../shared/Settings';
+import Settings from '../../shared/settings/Settings';
 
 @injectable()
 export default class SettingUseCase {
-- 
cgit v1.2.3