Fix hotbar migration of workspaces (#3178)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-06-25 09:55:25 -04:00
1 parent b9dfd20a93
commit 51655884c7
39 files changed
+333 -446

No files matched your search

@@ -39,6 +39,12 @@ jest.mock("../extension-installer", () => ({
installPackage: jest.fn()
}
}));
jest.mock("electron", () => ({
app: {
getPath: () => "tmp",
setLoginItemSettings: jest.fn(),
},
}));
console = new Console(process.stdout, process.stderr); // fix mockFS
const mockedWatch = watch as jest.MockedFunction<typeof watch>;
+2 -2
View File
@@ -77,7 +77,7 @@ export class ExtensionLoader extends Singleton {
if (this.instancesByName.has(change.newValue.name)) {
throw new TypeError("Extension names must be unique");
}
this.instancesByName.set(change.newValue.name, change.newValue);
break;
case "delete":
@@ -124,7 +124,7 @@ export class ExtensionLoader extends Singleton {
await this.initMain();
}
await Promise.all([this.whenLoaded, ExtensionsStore.getInstance().whenLoaded]);
await Promise.all([this.whenLoaded]);
// broadcasting extensions between main/renderer processes
reaction(() => this.toJSON(), () => this.broadcastExtensions(), {
+2 -2
View File
@@ -26,13 +26,13 @@ import type { LensExtension } from "./lens-extension";
export abstract class ExtensionStore<T> extends BaseStore<T> {
protected extension: LensExtension;
async loadExtension(extension: LensExtension) {
loadExtension(extension: LensExtension) {
this.extension = extension;
return super.load();
}
async load() {
load() {
if (!this.extension) { return; }
return super.load();
+1
View File
@@ -39,6 +39,7 @@ export class ExtensionsStore extends BaseStore<LensExtensionsStoreModel> {
configName: "lens-extensions",
});
makeObservable(this);
this.load();
}
@computed