From bf96cc2f15fdad802a514e54d88a722bb64bbea2 Mon Sep 17 00:00:00 2001 From: Lorenzo Blasa Date: Fri, 28 Jul 2023 13:04:46 -0700 Subject: [PATCH] Server notifications using connection troubleshoot notification Summary: Migrate to new server event which allows troubleshoot Reviewed By: passy Differential Revision: D47875977 fbshipit-source-id: 2549bef6ebb26660176747d44e3f535ad9f1d213 --- desktop/flipper-server-core/src/FlipperServerImpl.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/flipper-server-core/src/FlipperServerImpl.tsx b/desktop/flipper-server-core/src/FlipperServerImpl.tsx index 7a2a7f455..0d2c7d609 100644 --- a/desktop/flipper-server-core/src/FlipperServerImpl.tsx +++ b/desktop/flipper-server-core/src/FlipperServerImpl.tsx @@ -140,7 +140,7 @@ export class FlipperServerImpl implements FlipperServer { server.addListener( 'client-setup-error', ({client, error}: {client: UninitializedClient; error: Error}) => { - this.emit('notification', { + this.emit('connectivity-troubleshoot-notification', { title: `Connection to '${client.appName}' on '${client.deviceName}' failed`, description: `Failed to start client connection: ${error}`, type: 'error', @@ -161,7 +161,7 @@ export class FlipperServerImpl implements FlipperServer { const clientIdentifier = `${client.deviceName}#${client.appName}`; if (!this.unresponsiveClients.has(clientIdentifier)) { this.unresponsiveClients.add(clientIdentifier); - this.emit('notification', { + this.emit('connectivity-troubleshoot-notification', { type: 'error', title: `Timed out establishing connection with "${client.appName}" on "${client.deviceName}".`, description: