Convert to Shared Preference Plugin to Sandy
Summary: per title In addition, this diff adds `startUnactivated` option to allow setting up `onSend` mock implementation. Reviewed By: mweststrate Differential Revision: D24477989 fbshipit-source-id: f913574ebacdd436e8511baa43744249a014e90b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
467a6b16fb
commit
402ea2fc14
@@ -43,6 +43,7 @@ interface StartPluginOptions {
|
||||
initialState?: Record<string, any>;
|
||||
isArchived?: boolean;
|
||||
isBackgroundPlugin?: boolean;
|
||||
startUnactivated?: boolean;
|
||||
/** Provide a set of unsupported methods to simulate older clients that don't support certain methods yet */
|
||||
unsupportedMethods?: string[];
|
||||
}
|
||||
@@ -235,7 +236,9 @@ export function startPlugin<Module extends FlipperPluginModule<any>>(
|
||||
if (options?.isBackgroundPlugin) {
|
||||
pluginInstance.connect(); // otherwise part of activate
|
||||
}
|
||||
pluginInstance.activate();
|
||||
if (!options?.startUnactivated) {
|
||||
pluginInstance.activate();
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user