mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Simplify logic for injecting many instances which can reactively change e.g. based on extension being enabled or disabled (#5662)
* Reorganize stuff to prevent circular dependencies Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Install injectable extension to allow injecting reactively many implementations Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Switch to using computedInjectMany over filtering injectMany based on enabled extensions for simplicity Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Remove await for not being needed Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Sort dependencies alphabetically Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
1 parent
d0ed4e46b1
commit
f87f5f245c
35 files changed
+245
-333
No files matched your search
@@ -11,13 +11,13 @@ import { ExtensionSettings } from "./extension-settings";
|
||||
import type { IComputedValue } from "mobx";
|
||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||
import { Preferences } from "./preferences";
|
||||
import type { ExtensionTelemetryPreferenceRegistration } from "./telemetry-preference-items.injectable";
|
||||
import telemetryPreferenceItemsInjectable from "./telemetry-preference-items.injectable";
|
||||
import sentryDnsUrlInjectable from "./sentry-dns-url.injectable";
|
||||
import userStoreInjectable from "../../../common/user-store/user-store.injectable";
|
||||
import type { AppPreferenceRegistration } from "./app-preferences/app-preference-registration";
|
||||
|
||||
interface Dependencies {
|
||||
telemetryPreferenceItems: IComputedValue<ExtensionTelemetryPreferenceRegistration[]>;
|
||||
telemetryPreferenceItems: IComputedValue<AppPreferenceRegistration[]>;
|
||||
sentryDnsUrl: string;
|
||||
userStore: UserStore;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user