import { inject , injectable } from "inversify" ; import { TYPES } from "../utils/constants" ; import { BuildSettingsProvider } from "../../view/dataproviders/BuildSettingsProvider" ; import { BuildConfig } from "../entities/buildconfig" ; import { Context } from "../../view/Context" ; @ injectable ( ) export class QueueAtTop implements Command { public constructor ( @ inject ( TYPES . Context ) private readonly context , @ inject ( TYPES . BuildSettingsProvider ) private readonly buildSettingsProvider ) { } async exec ( args ? ) { const build = this . buildSettingsProvider . getCurrentBuild ( ) ; build . invertQueueAtTop ( ) ; this . context . setQueueAtTop ( build . shouldQueueAtTop ( ) ) ; } }