mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
refactor: revert some changes related to custom-titlebar lib
This commit is contained in:
1 parent
03ab774c54
commit
42079b4b84
1 file changed
+26
@@ -245,6 +245,8 @@ export class Api {
|
||||
.on(EPG_FORCE_FETCH, (event, arg) =>
|
||||
this.workerWindow.webContents.send(EPG_FORCE_FETCH, arg)
|
||||
);
|
||||
|
||||
this.setTitleBarListeners();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -326,6 +328,30 @@ export class Api {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 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();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the playlist from the given url and triggers the update operation
|
||||
* @param id id of the playlist to update
|
||||
|
||||
Reference in new issue
Block a user