diff --git a/desktop/plugins/layout/index.tsx b/desktop/plugins/layout/index.tsx index 1fc3cd74a..bfe7a16f1 100644 --- a/desktop/plugins/layout/index.tsx +++ b/desktop/plugins/layout/index.tsx @@ -200,6 +200,8 @@ export default class LayoutPlugin extends FlipperPlugin< screenDimensions: null, }; + private static isMylesInvoked = false; + init() { if (!this.props.persistedState) { // If the selected plugin from the previous session was layout, then while importing the flipper export, the redux store doesn't get updated in the first render, due to which the plugin crashes, as it has no persisted state @@ -222,6 +224,13 @@ export default class LayoutPlugin extends FlipperPlugin< this.openInIDE(params); }); + // since the first launch of Myles might produce a lag (Myles daemon needs to start) + // try to invoke Myles during the first launch of the Layout Plugin + if (!LayoutPlugin.isMylesInvoked) { + this.invokeMyles(); + LayoutPlugin.isMylesInvoked = true; + } + if (this.props.isArchivedDevice) { this.getDevice() .then((d) => { @@ -265,6 +274,10 @@ export default class LayoutPlugin extends FlipperPlugin< ); }; + invokeMyles = async () => { + await IDEFileResolver.resolveFullPathsFromMyles('.config', 'fbsource'); + }; + onToggleTargetMode = () => { const inTargetMode = !this.state.inTargetMode; this.setState({inTargetMode});