Automatically select plugin after auto-update
Summary: Select reloaded plugin automatically Reviewed By: mweststrate Differential Revision: D23987545 fbshipit-source-id: bf54ca54e4aa46b987d57e76fbc4f3e9e5fc336e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b3ca84fc1b
commit
bc39e72fd9
@@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
PluginDefinition,
|
PluginDefinition,
|
||||||
ClientPluginDefinition,
|
|
||||||
isSandyPlugin,
|
isSandyPlugin,
|
||||||
FlipperPlugin,
|
FlipperPlugin,
|
||||||
FlipperDevicePlugin,
|
FlipperDevicePlugin,
|
||||||
|
|||||||
@@ -246,7 +246,15 @@ export default (state: State = INITAL_STATE, action: Actions): State => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!selectDevice) {
|
if (!selectedDevice && selectedPlugin) {
|
||||||
|
const selectedClient = state.clients.find((c) =>
|
||||||
|
c.supportsPlugin(selectedPlugin),
|
||||||
|
);
|
||||||
|
selectedDevice = state.devices.find(
|
||||||
|
(v) => v.serial === selectedClient?.query.device_id,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!selectedDevice) {
|
||||||
console.warn('Trying to select a plugin before a device was selected!');
|
console.warn('Trying to select a plugin before a device was selected!');
|
||||||
}
|
}
|
||||||
if (selectedPlugin) {
|
if (selectedPlugin) {
|
||||||
|
|||||||
Reference in New Issue
Block a user