mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-06-24 21:25:23 +00:00
Electron: Error fixes
This commit is contained in:
parent
1ad346c6b4
commit
71a2c06b8c
2 changed files with 7 additions and 2 deletions
|
@ -28,6 +28,8 @@ if (TARGET === 'electron') {
|
|||
onPause: (callback: any) => electronAPI.ipcRenderer.on("pause", callback),
|
||||
onResume: (callback: any) => electronAPI.ipcRenderer.on("resume", callback),
|
||||
onSeek: (callback: any) => electronAPI.ipcRenderer.on("seek", callback),
|
||||
onSetVolume: (callback: any) => electronAPI.ipcRenderer.on("setvolume", callback),
|
||||
onSetSpeed: (callback: any) => electronAPI.ipcRenderer.on("setspeed", callback),
|
||||
getSessions: () => electronAPI.ipcRenderer.invoke('get-sessions'),
|
||||
sendSessionMessage: (opcode: Opcode, message: any) => electronAPI.ipcRenderer.send('send-session-message', { opcode: opcode, message: message }),
|
||||
disconnectDevice: (session: string) => electronAPI.ipcRenderer.send('disconnect-device', session),
|
||||
|
@ -61,7 +63,7 @@ if (TARGET === 'electron') {
|
|||
onResume: (callback: any) => { preloadData.onResumeCb = callback; },
|
||||
onSeek: (callback: any) => { preloadData.onSeekCb = callback; },
|
||||
onSetVolume: (callback: any) => { preloadData.onSetVolumeCb = callback; },
|
||||
onSetSpeed: (callback: any) => { preloadData.onSetSpeedCb = callback; }
|
||||
onSetSpeed: (callback: any) => { preloadData.onSetSpeedCb = callback; },
|
||||
};
|
||||
} else {
|
||||
// @ts-ignore
|
||||
|
|
|
@ -341,7 +341,10 @@ export class Main {
|
|||
Main.mainWindow.loadFile(path.join(__dirname, 'main/index.html'));
|
||||
Main.mainWindow.on('closed', () => {
|
||||
Main.mainWindow = null;
|
||||
networkWorker.close();
|
||||
|
||||
if (!networkWorker.isDestoryed()) {
|
||||
networkWorker.close();
|
||||
}
|
||||
});
|
||||
|
||||
Main.mainWindow.maximize();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue