mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
remove async
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
deaee41d61
commit
8a8549a9f2
@ -102,7 +102,7 @@ export abstract class BaseStore<T> extends Singleton {
|
|||||||
return AppPaths.get("userData");
|
return AppPaths.get("userData");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async saveToFile(model: T) {
|
protected saveToFile(model: T) {
|
||||||
logger.info(`[STORE]: SAVING ${this.path}`);
|
logger.info(`[STORE]: SAVING ${this.path}`);
|
||||||
|
|
||||||
// todo: update when fixed https://github.com/sindresorhus/conf/issues/114
|
// todo: update when fixed https://github.com/sindresorhus/conf/issues/114
|
||||||
@ -166,9 +166,9 @@ export abstract class BaseStore<T> extends Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async onModelChange(model: T) {
|
protected onModelChange(model: T) {
|
||||||
if (ipcMain) {
|
if (ipcMain) {
|
||||||
await this.saveToFile(model); // save config file
|
this.saveToFile(model); // save config file
|
||||||
broadcastMessage(this.syncRendererChannel, model);
|
broadcastMessage(this.syncRendererChannel, model);
|
||||||
} else {
|
} else {
|
||||||
broadcastMessage(this.syncMainChannel, model);
|
broadcastMessage(this.syncMainChannel, model);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user