Load routes to device during init (#1491)
Summary: This is a replacement for PR https://github.com/facebook/flipper/pull/1486 which had the wrong username When the network plugin is loaded, the route table in the device is empty. It needs to be populated with whatever routes have already been created and saved in local storage. Otherwise, the user would need to modify the routes to force an update. Issue is described here - https://github.com/facebook/flipper/issues/1476 ## Changelog Routes updated in device when plugin is initialized Pull Request resolved: https://github.com/facebook/flipper/pull/1491 Test Plan: 1. Create a mock for the get request in the sample Android app 2. Kill the app 3. Start the app 4. Issue the get request in the app 5. Verify that the request is mocked in the Network plugin  Reviewed By: passy Differential Revision: D23292355 Pulled By: mweststrate fbshipit-source-id: 2fe16e9067a627cae02a4b1db422952d364fd036
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3e95645f45
commit
47d3dd6413
@@ -342,6 +342,7 @@ export default class extends FlipperPlugin<State, any, PersistedState> {
|
||||
showMockResponseDialog: false,
|
||||
nextRouteId: Object.keys(routes).length,
|
||||
});
|
||||
informClientMockChange(routes);
|
||||
});
|
||||
|
||||
this.setState(this.parseDeepLinkPayload(this.props.deepLinkPayload));
|
||||
|
||||
Reference in New Issue
Block a user