mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
removed delay from base-store
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
parent
addc220b9f
commit
2b37fe3cc1
@ -12,7 +12,6 @@ import isEqual from "lodash/isEqual";
|
||||
export interface BaseStoreParams<T = any> extends ConfOptions<T> {
|
||||
autoLoad?: boolean;
|
||||
syncEnabled?: boolean;
|
||||
syncDelayMs?: number;
|
||||
}
|
||||
|
||||
export class BaseStore<T = any> extends Singleton {
|
||||
@ -28,7 +27,6 @@ export class BaseStore<T = any> extends Singleton {
|
||||
this.params = {
|
||||
autoLoad: false,
|
||||
syncEnabled: true,
|
||||
syncDelayMs: 100,
|
||||
...params,
|
||||
}
|
||||
this.init();
|
||||
@ -75,9 +73,7 @@ export class BaseStore<T = any> extends Singleton {
|
||||
|
||||
enableSync() {
|
||||
this.syncDisposers.push(
|
||||
reaction(() => this.toJSON(), model => this.onModelChange(model), {
|
||||
delay: this.params.syncDelayMs,
|
||||
}),
|
||||
reaction(() => this.toJSON(), model => this.onModelChange(model)),
|
||||
);
|
||||
if (ipcMain) {
|
||||
const callback = (event: IpcMainEvent, model: T) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user