Pass the status Msg as an argument

Summary: Before this diff whenever one called serialize method it showed `Serializing Flipper  ` msg without showing the explicit details of which data we are serializing. Thus with this diff one can pass the status msg as an argument which will be displayed while serializing.

Reviewed By: jknoxville

Differential Revision: D18173024

fbshipit-source-id: a4e7e073498993626204061d4e774099f00b8c5a
This commit is contained in:
Pritesh Nandgaonkar
2019-10-29 13:41:44 -07:00
committed by Facebook Github Bot
parent 63ac7e7e93
commit f49745448c
3 changed files with 14 additions and 3 deletions

View File

@@ -140,12 +140,19 @@ export abstract class FlipperBasePlugin<
persistedState: StaticPersistedState,
statusUpdate?: (msg: string) => void,
idler?: Idler,
pluginName?: string,
) => Promise<string> = (
persistedState: StaticPersistedState,
statusUpdate?: (msg: string) => void,
idler?: Idler,
pluginName?: string,
) => {
return serialize(persistedState, idler, statusUpdate);
return serialize(
persistedState,
idler,
statusUpdate,
pluginName != null ? `Serializing ${pluginName}` : undefined,
);
};
static deserializePersistedState: (
serializedString: string,