Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Commit

Permalink
automatically select reconnected clients
Browse files Browse the repository at this point in the history
Summary:
Changelog: Flipper will no automatically select any newly connected client

This reverts D26250896 (2df1179) 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
  • Loading branch information
mweststrate authored and facebook-github-bot committed Feb 26, 2021
1 parent f2689d3 commit 357d299
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions desktop/app/src/dispatcher/server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,7 @@ export function registerNewClient(store: Store, client: Client) {

const device = client.deviceSync;
if (device) {
const selectedDevice = connections.selectedDevice;
const selectedClient = connections.clients.find(
(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));
}
store.dispatch(selectDevice(device));
store.dispatch(selectClient(client.id));
}
}

0 comments on commit 357d299

Please sign in to comment.