Back out "[flipper] fix reconnecting clients"
Summary: Original commit changeset: 1d0e6ce17c89 Backing this out until we can come up with a better way to do it. The change was introduced so that when a device disconnects / crashes, we don't lose all plugin state, and you can still see what was on screen before the crash.. However, there are some problems with this solution, which get quite complicated. Putting them here for future reference: * Closing an app results in the plugins staying there, and there's no way to tell it's not actually connected. * If the app reconnects, the JS plugin doesn't get re-initialized. Even though the client plugin has been. Reviewed By: bnelo12 Differential Revision: D16280932 fbshipit-source-id: 92585cdd0dace2012924df4106327a1e21ab9f9b
This commit is contained in:
committed by
Facebook Github Bot
parent
42c887e634
commit
a097e673d8
@@ -237,9 +237,7 @@ const reducer = (state: State = INITAL_STATE, action: Action): State => {
|
||||
|
||||
return {
|
||||
...state,
|
||||
clients: state.clients
|
||||
.filter((client: Client) => client.id !== payload.id)
|
||||
.concat(payload),
|
||||
clients: state.clients.concat(payload),
|
||||
uninitializedClients: state.uninitializedClients.filter(c => {
|
||||
return (
|
||||
c.deviceId !== payload.query.device_id ||
|
||||
|
||||
Reference in New Issue
Block a user