diff --git a/desktop/flipper-ui-core/src/sandy-chrome/appinspect/LaunchEmulator.tsx b/desktop/flipper-ui-core/src/sandy-chrome/appinspect/LaunchEmulator.tsx
index c90a444c3..894c23f4d 100644
--- a/desktop/flipper-ui-core/src/sandy-chrome/appinspect/LaunchEmulator.tsx
+++ b/desktop/flipper-ui-core/src/sandy-chrome/appinspect/LaunchEmulator.tsx
@@ -160,133 +160,140 @@ export const LaunchEmulatorDialog = withTrackingScope(
return ;
}
- const items = [
-
,
- androidEmulators.length == 0 ? (
-
- {androidMessage}
-
- ) : null,
- ...chain(
- androidEmulators.map((name) => ({
- name,
- isFavorite: favoriteVirtualDevices.includes(name),
- })),
- )
- .sortBy((item) => [!item.isFavorite, item.name])
- .map(({name, isFavorite}) => {
- const launch = async (coldBoot: boolean) => {
- try {
- setPendingEmulators(
- produce((draft) => {
- draft.add(name);
- }),
- );
- await getRenderHostInstance().flipperServer.exec(
- 'android-launch-emulator',
- name,
- coldBoot,
- );
- onClose();
- } catch (e) {
- console.error('Failed to start emulator: ', e);
- message.error('Failed to start emulator: ' + e);
- } finally {
- setPendingEmulators(
- produce((draft) => {
- draft.delete(name);
- }),
- );
- }
- };
- const menu = (
-
+ );
+ return (
+
+ }
+ loading={pendingEmulators.has(name)}
+ onClick={() => launch(false)}>
+ {name}
+
+
+ );
+ })
+ .value(),
+ );
+ }
+ if (iosEnabled) {
+ items.push(
+ ,
+ iosEmulators.length == 0 ? (
+
+ {iOSMessage}
+
+ ) : null,
+ ...chain(iosEmulators)
+ .map((device) => ({
+ device,
+ isFavorite: favoriteVirtualDevices.includes(device.name),
+ }))
+ .sortBy((item) => [!item.isFavorite, item.device.name])
+ .map(({device, isFavorite}) => (
- }
- loading={pendingEmulators.has(name)}
- onClick={() => launch(false)}>
- {name}
-
+ name={device.name}>
+
- );
- })
- .value(),
-
- ,
- iosEmulators.length == 0 ? (
-
- {iOSMessage}
-
- ) : null,
- ...chain(iosEmulators)
- .map((device) => ({
- device,
- isFavorite: favoriteVirtualDevices.includes(device.name),
- }))
- .sortBy((item) => [!item.isFavorite, item.device.name])
- .map(({device, isFavorite}) => (
-
-
-
- ))
- .value(),
- ].filter((item) => item != null);
+ ))
+ .value(),
+ );
+ }
+ items = items.filter((item) => item != null);
const loadingSpinner = (
<>