mirror of
https://github.com/WowUp/WowUp.git
synced 2026-04-23 15:27:03 -04:00
Fix lint issues
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user