From 43242557aacef131c8cb61987c33ec35df052bc2 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Tue, 2 Mar 2021 09:51:16 -0800 Subject: [PATCH] Remove listDevices Summary: Appears to be unused. Reviewed By: mweststrate Differential Revision: D26753922 fbshipit-source-id: 7a21b8242e4c8d2428a286bc6ef63adafe74a78c --- desktop/app/src/dispatcher/iOSDevice.tsx | 14 -------------- desktop/app/src/utils/listDevices.tsx | 24 ------------------------ 2 files changed, 38 deletions(-) delete mode 100644 desktop/app/src/utils/listDevices.tsx diff --git a/desktop/app/src/dispatcher/iOSDevice.tsx b/desktop/app/src/dispatcher/iOSDevice.tsx index 2df5ef737..daef59aa6 100644 --- a/desktop/app/src/dispatcher/iOSDevice.tsx +++ b/desktop/app/src/dispatcher/iOSDevice.tsx @@ -275,20 +275,6 @@ async function isXcodeDetected(): Promise { .catch((_) => false); } -export async function getActiveDevicesAndSimulators( - store: Store, -): Promise> { - const activeDevices: Array> = await Promise.all([ - getSimulators(store, true), - getActiveDevices(store.getState().settingsState.idbPath), - ]); - const allDevices = activeDevices[0].concat(activeDevices[1]); - return allDevices.map((device) => { - const {udid, type, name} = device; - return new IOSDevice(udid, type, name); - }); -} - export default (store: Store, logger: Logger) => { if (!store.getState().settingsState.enableIOS) { return; diff --git a/desktop/app/src/utils/listDevices.tsx b/desktop/app/src/utils/listDevices.tsx deleted file mode 100644 index e71708ce7..000000000 --- a/desktop/app/src/utils/listDevices.tsx +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import {getActiveAndroidDevices} from '../dispatcher/androidDevice'; -import {getActiveDevicesAndSimulators} from '../dispatcher/iOSDevice'; -import BaseDevice from '../devices/BaseDevice'; -import {Store} from '../reducers/index'; - -export async function listDevices(store: Store): Promise> { - const state = store.getState(); - const androidDevices = state.settingsState.enableAndroid - ? await getActiveAndroidDevices(store) - : []; - const iOSDevices: BaseDevice[] = state.settingsState.enableIOS - ? await getActiveDevicesAndSimulators(store) - : []; - return [...androidDevices, ...iOSDevices]; -}