From 42d902982a1d2edbca8ca2edb5fb25e642794e2a Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 22 Jul 2018 15:39:23 +0900 Subject: Indicator as Clean Architecture --- src/background/controllers/addon-enabled.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/background/controllers/addon-enabled.js (limited to 'src/background/controllers/addon-enabled.js') diff --git a/src/background/controllers/addon-enabled.js b/src/background/controllers/addon-enabled.js new file mode 100644 index 0000000..0f5d801 --- /dev/null +++ b/src/background/controllers/addon-enabled.js @@ -0,0 +1,11 @@ +import AddonEnabledInteractor from '../usecases/addon-enabled'; + +export default class AddonEnabledController { + constructor() { + this.addonEnabledInteractor = new AddonEnabledInteractor(); + } + + indicate(enabled) { + this.addonEnabledInteractor.indicate(enabled); + } +} -- cgit v1.2.3 From 6f4e327b6f91aa687b373463d8bc284ffaceba53 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sat, 28 Jul 2018 19:09:49 +0900 Subject: Fix indicate return values --- src/background/controllers/addon-enabled.js | 2 +- src/background/usecases/addon-enabled.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/background/controllers/addon-enabled.js') diff --git a/src/background/controllers/addon-enabled.js b/src/background/controllers/addon-enabled.js index 0f5d801..6a9b776 100644 --- a/src/background/controllers/addon-enabled.js +++ b/src/background/controllers/addon-enabled.js @@ -6,6 +6,6 @@ export default class AddonEnabledController { } indicate(enabled) { - this.addonEnabledInteractor.indicate(enabled); + return this.addonEnabledInteractor.indicate(enabled); } } diff --git a/src/background/usecases/addon-enabled.js b/src/background/usecases/addon-enabled.js index 37eb1c2..d83192f 100644 --- a/src/background/usecases/addon-enabled.js +++ b/src/background/usecases/addon-enabled.js @@ -15,7 +15,7 @@ export default class AddonEnabledInteractor { } indicate(enabled) { - this.indicatorPresentor.indicate(enabled); + return this.indicatorPresentor.indicate(enabled); } onIndicatorClick(tabId) { -- cgit v1.2.3