Fix lint issues

This commit is contained in:
jliddev
2022-11-22 09:17:39 -06:00
parent 57bf583fb6
commit 5bf8aaf99f
2 changed files with 11 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
import { BrowserWindow, ipcMain, WebContents } from "electron";
import { BrowserWindow, ipcMain, powerMonitor, WebContents } from "electron";
import * as log from "electron-log";
class WagoHandler {
@@ -8,7 +8,14 @@ class WagoHandler {
private _webContents: WebContents | undefined = undefined;
private _tokenMap = new Map<number, boolean>();
initialize(window: BrowserWindow): void {
public constructor() {
powerMonitor.on("resume", () => {
log.info("[wago-handler] powerMonitor resume");
this._webContents?.reload();
});
}
public initialize(window: BrowserWindow): void {
if (this._initialized) {
return;
}
@@ -30,7 +37,7 @@ class WagoHandler {
});
}
initializeWebContents(webContents: WebContents) {
public initializeWebContents(webContents: WebContents) {
if (this._webContents !== undefined) {
this.removeListeners(this._webContents);
// log.warn("[wago-handler] unable to set webContents, already exists", this._webContents.id, webContents.id);

View File

@@ -1,5 +1,5 @@
import { BehaviorSubject, firstValueFrom, from, Observable, of } from "rxjs";
import { catchError, first, switchMap, tap, timeout } from "rxjs/operators";
import { catchError, first, tap, timeout } from "rxjs/operators";
import { v4 as uuidv4 } from "uuid";
import _ from "lodash";