1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Use structural comparer only in cluster-store

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala 2020-11-19 14:26:27 +02:00
parent 2f65f9f0d5
commit ee5ad36b21
2 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@ import path from "path"
import Config from "conf"
import { Options as ConfOptions } from "conf/dist/source/types"
import { app, ipcMain, IpcMainEvent, ipcRenderer, IpcRendererEvent, remote } from "electron"
import { action, comparer, IReactionOptions, observable, reaction, runInAction, toJS, when } from "mobx";
import { action, IReactionOptions, observable, reaction, runInAction, toJS, when } from "mobx";
import Singleton from "./utils/singleton";
import { getAppVersion } from "./utils/app-version";
import logger from "../main/logger";
@ -28,9 +28,6 @@ export class BaseStore<T = any> extends Singleton {
this.params = {
autoLoad: false,
syncEnabled: true,
syncOptions: {
equals: comparer.structural,
},
...params,
}
this.init();

View File

@ -2,7 +2,7 @@ import type { WorkspaceId } from "./workspace-store";
import path from "path";
import { app, ipcRenderer, remote, webFrame } from "electron";
import { unlink } from "fs-extra";
import { action, computed, observable, reaction, toJS } from "mobx";
import { action, comparer, computed, observable, reaction, toJS } from "mobx";
import { BaseStore } from "./base-store";
import { Cluster, ClusterState } from "../main/cluster";
import migrations from "../migrations/cluster-store"
@ -90,6 +90,9 @@ export class ClusterStore extends BaseStore<ClusterStoreModel> {
configName: "lens-cluster-store",
accessPropertiesByDotNotation: false, // To make dots safe in cluster context names
migrations: migrations,
syncOptions: {
equals: comparer.structural,
},
});
this.pushStateToViewsAutomatically()