1
0
Fork 0
mirror of https://gitlab.com/futo-org/fcast.git synced 2025-08-03 15:57:01 +00:00

Receivers: Fixed logic issues with connection monitor

This commit is contained in:
Michael Hollister 2025-04-29 11:57:25 -05:00
parent 270a998e18
commit 9b47627801
9 changed files with 39 additions and 57 deletions

View file

@ -33,6 +33,7 @@ if (TARGET === 'electron') {
onConnect: (callback: any) => electronAPI.ipcRenderer.on('connect', callback),
onDisconnect: (callback: any) => electronAPI.ipcRenderer.on('disconnect', callback),
onPing: (callback: any) => electronAPI.ipcRenderer.on('ping', callback),
onPong: (callback: any) => electronAPI.ipcRenderer.on('pong', callback),
});
// @ts-ignore

View file

@ -334,11 +334,9 @@ function onPlay(_event, value: PlayMessage) {
connectionMonitor.setUiUpdateCallbacks({
onConnect: (connections: string[], connectionInfo: any) => {
console.log(`Device connected: ${JSON.stringify(connectionInfo)}`);
toast('Device connected', ToastIcon.INFO);
},
onDisconnect: (connections: string[], connectionInfo: any) => {
console.log(`Device disconnected: ${JSON.stringify(connectionInfo)}`);
toast('Device disconnected. If you experience playback issues, please reconnect.', ToastIcon.INFO);
},
});