From 3b6be6b7b6e9113896d51f503f1289abb76a8955 Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Tue, 9 Feb 2021 04:12:09 -0800 Subject: [PATCH] Minor improvements in handling offline applications Summary: Some minor loose ends from exploratory testing: - disconnect device logs event listeners if the device disconnects - show metro if that is still up, even if the app is no longer connected - hide the options in the support form to record videos / screenshots if the device isn't connected Reviewed By: nikoant Differential Revision: D26277100 fbshipit-source-id: 49d0c934d587b226bc25524224efce60b53939e9 --- desktop/app/src/devices/BaseDevice.tsx | 1 + desktop/app/src/sandy-chrome/appinspect/PluginList.tsx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/desktop/app/src/devices/BaseDevice.tsx b/desktop/app/src/devices/BaseDevice.tsx index b55ec88b3..59fcff3f2 100644 --- a/desktop/app/src/devices/BaseDevice.tsx +++ b/desktop/app/src/devices/BaseDevice.tsx @@ -225,6 +225,7 @@ export default class BaseDevice { } disconnect() { + this.logListeners.clear(); this.connected.set(false); } diff --git a/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx b/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx index f9edf59a9..3371b93ab 100644 --- a/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx +++ b/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx @@ -86,6 +86,8 @@ export const PluginList = memo(function PluginList({ pluginsChanged, ]); const isConnected = useValue(activeDevice?.connected, false); + const metroConnected = useValue(metroDevice?.connected, false); + const isArchived = activeDevice?.isArchived; const annotatedDownloadablePlugins = useMemoize< [ @@ -198,7 +200,7 @@ export const PluginList = memo(function PluginList({ ))} - {isConnected && ( + {!isArchived && metroConnected && (