chore: update to electron v16

This commit is contained in:
4gray committed 2022-01-25 00:04:21 +01:00
1 parent 98ff7f4fa4
commit de50d5b42c
5 files changed
+896 -875

No files matched your search

+25
View File
@@ -230,9 +230,34 @@ export class Api {
})
);
this.setTitleBarListeners();
this.refreshPlaylists();
}
/**
* Set default listeners for custom-titlebar
*/
setTitleBarListeners() {
ipcMain.on('window-minimize', function (event) {
BrowserWindow.fromWebContents(event.sender).minimize();
});
ipcMain.on('window-maximize', function (event) {
const window = BrowserWindow.fromWebContents(event.sender);
window.isMaximized() ? window.unmaximize() : window.maximize();
});
ipcMain.on('window-close', function (event) {
BrowserWindow.fromWebContents(event.sender).close();
});
ipcMain.on('window-is-maximized', function (event) {
event.returnValue = BrowserWindow.fromWebContents(
event.sender
).isMaximized();
});
}
/**
* Starts the update process for all the playlists with the enabled auto-refresh flag
*/