diff --git a/desktop/app/src/dispatcher/handleOpenPluginDeeplink.tsx b/desktop/app/src/dispatcher/handleOpenPluginDeeplink.tsx index f7d40c087..e178118df 100644 --- a/desktop/app/src/dispatcher/handleOpenPluginDeeplink.tsx +++ b/desktop/app/src/dispatcher/handleOpenPluginDeeplink.tsx @@ -26,7 +26,6 @@ import isProduction, {isTest} from '../utils/isProduction'; import restart from '../utils/restartFlipper'; import BaseDevice from '../server/devices/BaseDevice'; import Client from '../Client'; -import {Button} from 'antd'; import {RocketOutlined} from '@ant-design/icons'; import {showEmulatorLauncher} from '../sandy-chrome/appinspect/LaunchEmulator'; @@ -491,41 +490,42 @@ async function launchDeviceDialog( title: string, ) { return new Promise((resolve) => { - const dialog = Dialog.alert({ + const currentDevices = store.getState().connections.devices; + const waitForNewDevice = async () => + await waitFor( + store, + (state) => state.connections.devices !== currentDevices, + ); + const dialog = Dialog.confirm({ title, - type: 'warning', message: (

To open the current deeplink for plugin {params.pluginId} a device{' '} {params.devices.length ? ' of type ' + params.devices.join(', ') : ''}{' '} should be up and running. No device was found. Please connect a device - or launch an emulator / simulator{' '} -