1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/features/application-update/main/updating-is-enabled.injectable.ts
Iku-turso 97e04632ca
Move some code for application update to feature directory
The rest of the code could not be moved yet because of work-in-progress refactorings for OCP compliance.

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
2022-10-20 08:35:44 +03:00

21 lines
784 B
TypeScript

/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import electronUpdaterIsActiveInjectable from "../../../main/electron-app/features/electron-updater-is-active.injectable";
import publishIsConfiguredInjectable from "./publish-is-configured.injectable";
const updatingIsEnabledInjectable = getInjectable({
id: "updating-is-enabled",
instantiate: (di) => {
const electronUpdaterIsActive = di.inject(electronUpdaterIsActiveInjectable);
const publishIsConfigured = di.inject(publishIsConfiguredInjectable);
return electronUpdaterIsActive && publishIsConfigured;
},
});
export default updatingIsEnabledInjectable;