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:
parent
270a998e18
commit
9b47627801
9 changed files with 39 additions and 57 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue