mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Introduce a centralised way to emit telemetry from calls of injectable functions (#6164)
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi> Co-authored-by: Juho Heikka <juho.heikka@gmail.com>
This commit is contained in:
43 files changed
+527
-163
No files matched your search
+7
-2
@@ -10,6 +10,7 @@ import appNameInjectable from "../../../app-paths/app-name/app-name.injectable";
|
||||
import appEventBusInjectable from "../../../../common/app-event-bus/app-event-bus.injectable";
|
||||
import waitUntilBundledExtensionsAreLoadedInjectable from "./wait-until-bundled-extensions-are-loaded.injectable";
|
||||
import { applicationWindowInjectionToken } from "./application-window-injection-token";
|
||||
import { runInAction } from "mobx";
|
||||
|
||||
const createApplicationWindowInjectable = getInjectable({
|
||||
id: "create-application-window",
|
||||
@@ -49,7 +50,9 @@ const createApplicationWindowInjectable = getInjectable({
|
||||
},
|
||||
|
||||
onClose: () => {
|
||||
parentDi.deregister(windowInjectable);
|
||||
runInAction(() => {
|
||||
parentDi.deregister(windowInjectable);
|
||||
});
|
||||
},
|
||||
|
||||
beforeOpen: waitUntilBundledExtensionsAreLoaded,
|
||||
@@ -59,7 +62,9 @@ const createApplicationWindowInjectable = getInjectable({
|
||||
injectionToken: applicationWindowInjectionToken,
|
||||
});
|
||||
|
||||
parentDi.register(windowInjectable);
|
||||
runInAction(() => {
|
||||
parentDi.register(windowInjectable);
|
||||
});
|
||||
|
||||
return parentDi.inject(windowInjectable);
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user