Merge branch 'main' into enhancement/lastfm

This commit is contained in:
Core 2022-06-16 00:34:20 +01:00
commit 2fc4005b6c
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6

View file

@ -2,7 +2,7 @@ import * as fs from "fs";
import * as path from "path"; import * as path from "path";
import {Store} from "./store"; import {Store} from "./store";
import {BrowserWindow as bw} from "./browserwindow"; import {BrowserWindow as bw} from "./browserwindow";
import {app, dialog, ipcMain, Notification, shell } from "electron"; import {app, dialog, ipcMain, Notification, shell, BrowserWindow} from "electron";
import fetch from "electron-fetch"; import fetch from "electron-fetch";
import {AppImageUpdater, NsisUpdater} from "electron-updater"; import {AppImageUpdater, NsisUpdater} from "electron-updater";
import * as log from "electron-log"; import * as log from "electron-log";
@ -131,7 +131,11 @@ export class utils {
* Gets the browser window * Gets the browser window
*/ */
static getWindow(): Electron.BrowserWindow { static getWindow(): Electron.BrowserWindow {
if (bw.win) {
return bw.win return bw.win
} else {
return BrowserWindow.getAllWindows()[0]
}
} }
static loadPluginFrontend(path: string): void { static loadPluginFrontend(path: string): void {