mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Make injecting legacy singleton always provide new instance
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
parent
39795d8f35
commit
76101023df
@ -7,7 +7,13 @@ import { UserStore } from "./user-store";
|
||||
|
||||
const userStoreInjectable = getInjectable({
|
||||
id: "user-store",
|
||||
instantiate: () => UserStore.createInstance(),
|
||||
|
||||
instantiate: () => {
|
||||
UserStore.resetInstance();
|
||||
|
||||
return UserStore.createInstance();
|
||||
},
|
||||
|
||||
causesSideEffects: true,
|
||||
});
|
||||
|
||||
|
||||
@ -7,7 +7,13 @@ import { ExtensionsStore } from "./extensions-store";
|
||||
|
||||
const extensionsStoreInjectable = getInjectable({
|
||||
id: "extensions-store",
|
||||
instantiate: () => ExtensionsStore.createInstance(),
|
||||
|
||||
instantiate: () => {
|
||||
ExtensionsStore.resetInstance();
|
||||
|
||||
return ExtensionsStore.createInstance();
|
||||
},
|
||||
|
||||
causesSideEffects: true,
|
||||
});
|
||||
|
||||
|
||||
@ -7,7 +7,13 @@ import { WindowManager } from "./window-manager";
|
||||
|
||||
const windowManagerInjectable = getInjectable({
|
||||
id: "window-manager",
|
||||
instantiate: () => WindowManager.createInstance(),
|
||||
|
||||
instantiate: () => {
|
||||
WindowManager.resetInstance();
|
||||
|
||||
return WindowManager.createInstance();
|
||||
},
|
||||
|
||||
causesSideEffects: true,
|
||||
});
|
||||
|
||||
|
||||
@ -7,7 +7,13 @@ import { ThemeStore } from "./theme.store";
|
||||
|
||||
const themeStoreInjectable = getInjectable({
|
||||
id: "theme-store",
|
||||
instantiate: () => ThemeStore.createInstance(),
|
||||
|
||||
instantiate: () => {
|
||||
ThemeStore.resetInstance();
|
||||
|
||||
return ThemeStore.createInstance();
|
||||
},
|
||||
|
||||
causesSideEffects: true,
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user