automatically select reconnected clients
Summary:
Changelog: Flipper will no automatically select any newly connected client
This reverts D26250896 (2df117923c) to V5, which is to aggressively select new clients. The current behavior was too conservative and caused Flipper to jump to a different client, without returning, after reconnecting a disconnected device.
As reported in https://fb.workplace.com/groups/flippersupport/permalink/1084676302013027/
Reviewed By: fabiomassimo
Differential Revision: D26691046
fbshipit-source-id: b16af2052f58dc1d4254eb1e6ebbb5848c53ed7e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f2689d3a5d
commit
357d2991d5
@@ -122,18 +122,7 @@ export function registerNewClient(store: Store, client: Client) {
|
|||||||
|
|
||||||
const device = client.deviceSync;
|
const device = client.deviceSync;
|
||||||
if (device) {
|
if (device) {
|
||||||
const selectedDevice = connections.selectedDevice;
|
store.dispatch(selectDevice(device));
|
||||||
const selectedClient = connections.clients.find(
|
store.dispatch(selectClient(client.id));
|
||||||
(c) => c.id === connections.selectedApp,
|
|
||||||
);
|
|
||||||
if (
|
|
||||||
// If this condition meets, it means that the previous app wasn't selected explicitly by the user
|
|
||||||
connections.selectedApp !== connections.userPreferredApp ||
|
|
||||||
!selectedClient ||
|
|
||||||
!selectedDevice
|
|
||||||
) {
|
|
||||||
store.dispatch(selectDevice(device));
|
|
||||||
store.dispatch(selectClient(client.id));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user