diff --git a/src/chrome/MainSidebar.js b/src/chrome/MainSidebar.js index 229b54a79..c18e7aab2 100644 --- a/src/chrome/MainSidebar.js +++ b/src/chrome/MainSidebar.js @@ -198,31 +198,41 @@ class MainSidebar extends Component { plugin={plugin} /> ))} - {clients.map((client: Client) => ( - - {client.query.app} - {plugins - .filter( - (p: Class>) => client.plugins.indexOf(p.id) > -1, - ) - .map((plugin: Class>) => ( - - selectPlugin({ - selectedPlugin: plugin.id, - selectedApp: client.id, - }) - } - plugin={plugin} - app={client.query.app} - /> - ))} - - ))} + {clients + .filter( + (client: Client) => + (selectedDevice && + client.query.device_id === selectedDevice.serial) || + // Old android sdk versions don't know their device_id + // Display their plugins under all selected devices until they die out + client.query.device_id === 'unknown', + ) + .map((client: Client) => ( + + {client.query.app} + {plugins + .filter( + (p: Class>) => + client.plugins.indexOf(p.id) > -1, + ) + .map((plugin: Class>) => ( + + selectPlugin({ + selectedPlugin: plugin.id, + selectedApp: client.id, + }) + } + plugin={plugin} + app={client.query.app} + /> + ))} + + ))} ); }