aboutsummaryrefslogtreecommitdiff
path: root/src/background/operators/impls/ReloadTabOperator.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/operators/impls/ReloadTabOperator.ts')
-rw-r--r--src/background/operators/impls/ReloadTabOperator.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/background/operators/impls/ReloadTabOperator.ts b/src/background/operators/impls/ReloadTabOperator.ts
new file mode 100644
index 0000000..db3389e
--- /dev/null
+++ b/src/background/operators/impls/ReloadTabOperator.ts
@@ -0,0 +1,14 @@
+import Operator from "../Operator";
+import TabPresenter from "../../presenters/TabPresenter";
+
+export default class ReloadTabOperator implements Operator {
+ constructor(
+ private readonly tabPresenter: TabPresenter,
+ private readonly cache: boolean
+ ) {}
+
+ async run(): Promise<void> {
+ const tab = await this.tabPresenter.getCurrent();
+ return this.tabPresenter.reload(tab.id as number, this.cache);
+ }
+}