Fix Messenger not showing up in Sandy
Summary: Metro and Mac device were always hidden in Sandy, but they should only be hidden if they don't have underlying Clients. Fixes https://fb.workplace.com/groups/748354712423318/permalink/775342569724532/ Reviewed By: nikoant Differential Revision: D25369492 fbshipit-source-id: fdc25c3646d8339ae029425b4c45d8631bbee762
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fa00575dec
commit
244b6dc1be
@@ -172,7 +172,14 @@ function computeEntries(
|
||||
onSelectDevice: (device: BaseDevice) => void,
|
||||
onSelectApp: (device: BaseDevice, client: Client) => void,
|
||||
) {
|
||||
const entries = devices.filter(canBeDefaultDevice).map((device) => {
|
||||
const entries = devices
|
||||
.filter(
|
||||
(device) =>
|
||||
// hide non default devices, unless they have a connected client
|
||||
canBeDefaultDevice(device) ||
|
||||
clients.some((c) => c.deviceSync === device),
|
||||
)
|
||||
.map((device) => {
|
||||
const deviceEntry = (
|
||||
<Menu.Item
|
||||
icon={getOsIcon(device.os)}
|
||||
@@ -184,7 +191,8 @@ function computeEntries(
|
||||
{device.displayTitle()}
|
||||
</Menu.Item>
|
||||
);
|
||||
const clientEntries = getAvailableClients(device, clients).map((client) => (
|
||||
const clientEntries = getAvailableClients(device, clients).map(
|
||||
(client) => (
|
||||
<Menu.Item
|
||||
key={client.id}
|
||||
onClick={() => {
|
||||
@@ -192,7 +200,8 @@ function computeEntries(
|
||||
}}>
|
||||
<Radio value={client.id}>{client.query.app}</Radio>
|
||||
</Menu.Item>
|
||||
));
|
||||
),
|
||||
);
|
||||
return [deviceEntry, ...clientEntries];
|
||||
});
|
||||
if (uninitializedClients.length) {
|
||||
|
||||
Reference in New Issue
Block a user