aboutsummaryrefslogtreecommitdiff
path: root/src/background/operators/impls/UnpinTabOperator.ts
blob: fa50145fdb8c0c82fa68b412986872eec157061a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
import Operator from "../Operator";
import TabPresenter from "../../presenters/TabPresenter";

export default class UnpinTabOperator implements Operator {
  constructor(private readonly tabPresenter: TabPresenter) {}

  async run(): Promise<void> {
    const tab = await this.tabPresenter.getCurrent();
    return this.tabPresenter.setPinned(tab.id as number, false);
  }
}