blob: fe2b7712c35341471f9127fa0c9731a371fff278 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import Operator from "../Operator";
import AddonIndicatorClient from "../../client/AddonIndicatorClient";
import AddonEnabledRepository from "../../repositories/AddonEnabledRepository";
import ConsoleFramePresenter from "../../presenters/ConsoleFramePresenter";
export default class EnableAddonOperator implements Operator {
constructor(
private readonly indicator: AddonIndicatorClient,
private readonly repository: AddonEnabledRepository,
private readonly consoleFramePresenter: ConsoleFramePresenter
) {}
async run(): Promise<void> {
this.repository.set(true);
this.consoleFramePresenter.attach();
await this.indicator.setEnabled(true);
}
}
|