mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove dead code
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
6f4ddf72e8
commit
866a69ef67
@ -1,27 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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 { reaction } from "mobx";
|
|
||||||
import { getStartableStoppable } from "../../../common/utils/get-startable-stoppable";
|
|
||||||
import { setNativeThemeChannel } from "../../../common/ipc/native-theme";
|
|
||||||
import operatingSystemThemeInjectable from "../operating-system-theme.injectable";
|
|
||||||
import broadcastMessageInjectable from "../../../common/ipc/broadcast-message.injectable";
|
|
||||||
|
|
||||||
const broadcastThemeChangeInjectable = getInjectable({
|
|
||||||
id: "broadcast-theme-change",
|
|
||||||
|
|
||||||
instantiate: (di) => {
|
|
||||||
const currentTheme = di.inject(operatingSystemThemeInjectable);
|
|
||||||
const broadcastMessage = di.inject(broadcastMessageInjectable);
|
|
||||||
|
|
||||||
return getStartableStoppable("broadcast-theme-change", () =>
|
|
||||||
reaction(() => currentTheme.get(), (theme) => {
|
|
||||||
broadcastMessage(setNativeThemeChannel, theme);
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
export default broadcastThemeChangeInjectable;
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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 { onLoadOfApplicationInjectionToken } from "../../start-main-application/runnable-tokens/on-load-of-application-injection-token";
|
|
||||||
import broadcastThemeChangeInjectable from "./broadcast-theme-change.injectable";
|
|
||||||
|
|
||||||
const startBroadcastingThemeChangeInjectable = getInjectable({
|
|
||||||
id: "start-broadcasting-theme-change",
|
|
||||||
|
|
||||||
instantiate: (di) => {
|
|
||||||
const broadcastThemeChange = di.inject(broadcastThemeChangeInjectable);
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: "start-broadcasting-theme-change",
|
|
||||||
run: async () => {
|
|
||||||
await broadcastThemeChange.start();
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
injectionToken: onLoadOfApplicationInjectionToken,
|
|
||||||
});
|
|
||||||
|
|
||||||
export default startBroadcastingThemeChangeInjectable;
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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 broadcastThemeChangeInjectable from "./broadcast-theme-change.injectable";
|
|
||||||
import { beforeQuitOfBackEndInjectionToken } from "../../start-main-application/runnable-tokens/before-quit-of-back-end-injection-token";
|
|
||||||
|
|
||||||
const stopBroadcastingThemeChangeInjectable = getInjectable({
|
|
||||||
id: "stop-broadcasting-theme-change",
|
|
||||||
|
|
||||||
instantiate: (di) => {
|
|
||||||
const broadcastThemeChange = di.inject(broadcastThemeChangeInjectable);
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: "stop-broadcasting-theme-change",
|
|
||||||
run: () => void broadcastThemeChange.stop(),
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
injectionToken: beforeQuitOfBackEndInjectionToken,
|
|
||||||
});
|
|
||||||
|
|
||||||
export default stopBroadcastingThemeChangeInjectable;
|
|
||||||
Loading…
Reference in New Issue
Block a user