From 36c28a538955c0cd9d94c210372337d7a5c2a01b Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 29 Nov 2020 09:31:45 +0900 Subject: extract independent classes --- src/content/operators/impls/StartFollowOperator.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/content/operators/impls/StartFollowOperator.ts (limited to 'src/content/operators/impls/StartFollowOperator.ts') diff --git a/src/content/operators/impls/StartFollowOperator.ts b/src/content/operators/impls/StartFollowOperator.ts new file mode 100644 index 0000000..6f30058 --- /dev/null +++ b/src/content/operators/impls/StartFollowOperator.ts @@ -0,0 +1,14 @@ +import Operator from "../Operator"; +import FollowMasterClient from "../../client/FollowMasterClient"; + +export default class StartFollowOperator implements Operator { + constructor( + private readonly followMasterClient: FollowMasterClient, + private readonly newTab: boolean, + private readonly background: boolean + ) {} + + async run(): Promise { + this.followMasterClient.startFollow(this.newTab, this.background); + } +} -- cgit v1.2.3