Request all metadata for Images plugin before export
Summary:
Fresco plugin on the desktop side used to ask for all the image list along with the metadata when it was mounted. The mobile side never sent the image list and other information if not requested from it. That means, although Fresco plugin is a background plugin, there weren't any messages sent from the mobile side. Thus there was no trace available for Images plugin when the trace was exported. This diff, adds a hook which gets called before the export, where we request all the metadata from the mobile SDK.
BUG:
{F159305887}
Reviewed By: passy
Differential Revision: D15407962
fbshipit-source-id: 0012de2ab29d0f62e92d00f4926b04b1e394b62a
This commit is contained in:
committed by
Facebook Github Bot
parent
7576e1c61d
commit
914cbf6ccd
@@ -319,6 +319,15 @@ export function importDataToStore(data: string, store: Store) {
|
||||
|
||||
const {pluginStates} = json.store;
|
||||
const keys = Object.keys(pluginStates);
|
||||
keys.forEach(key => {
|
||||
store.dispatch({
|
||||
type: 'SET_PLUGIN_STATE',
|
||||
payload: {
|
||||
pluginKey: key,
|
||||
state: pluginStates[key],
|
||||
},
|
||||
});
|
||||
});
|
||||
clients.forEach(client => {
|
||||
const clientPlugins = keys
|
||||
.filter(key => {
|
||||
@@ -340,15 +349,6 @@ export function importDataToStore(data: string, store: Store) {
|
||||
),
|
||||
});
|
||||
});
|
||||
keys.forEach(key => {
|
||||
store.dispatch({
|
||||
type: 'SET_PLUGIN_STATE',
|
||||
payload: {
|
||||
pluginKey: key,
|
||||
state: pluginStates[key],
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export const importFileToStore = (file: string, store: Store) => {
|
||||
|
||||
Reference in New Issue
Block a user