diff --git a/src/plugins/layout/index.tsx b/src/plugins/layout/index.tsx index 01091e1f1..cfad45870 100644 --- a/src/plugins/layout/index.tsx +++ b/src/plugins/layout/index.tsx @@ -19,6 +19,7 @@ import { VerticalRule, Button, GK, + Idler, } from 'flipper'; import Inspector from './Inspector'; import ToolbarIcon from './ToolbarIcon'; @@ -63,6 +64,25 @@ export default class Layout extends FlipperPlugin { return allNodes; }; + static serializePersistedState: ( + persistedState: PersistedState, + statusUpdate?: (msg: string) => void, + idler?: Idler, + ) => Promise = ( + persistedState: PersistedState, + statusUpdate?: (msg: string) => void, + _idler?: Idler, + ) => { + statusUpdate && statusUpdate('Serializing Inspector Plugin...'); + return Promise.resolve(JSON.stringify(persistedState)); + }; + + static deserializePersistedState: ( + serializedString: string, + ) => PersistedState = (serializedString: string) => { + return JSON.parse(serializedString); + }; + static defaultPersistedState = { rootElement: null, rootAXElement: null,