@@ -464,11 +464,6 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
464464 */
465465 #restoreSidebarVisibilityOnTraceLoad = false ;
466466
467- /**
468- * Store React Native platform metadata (Android, iOS, etc.)
469- */
470- #platformMetadata: Protocol . ReactNativeApplication . MetadataUpdatedEvent | null = null ;
471-
472467 /**
473468 * Used to track an aria announcement that we need to alert for
474469 * screen-readers. We track these because we debounce announcements to not
@@ -720,19 +715,13 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
720715 model . addEventListener (
721716 SDK . ReactNativeApplicationModel . Events . METADATA_UPDATED ,
722717 ( event : Common . EventTarget . EventTargetEvent < Protocol . ReactNativeApplication . MetadataUpdatedEvent > ) => {
723- this . #platformMetadata = event . data ;
724- if ( this . #platformMetadata. platform === 'android' ) {
718+ if ( event . data . platform === 'android' ) {
725719 this . showScreenshotsToolbarCheckbox ?. setVisible ( true ) ;
726720 }
727721 }
728722 ) ;
729723 model . addEventListener (
730724 SDK . ReactNativeApplicationModel . Events . TRACE_REQUESTED , ( ) => this . rnPrepareForTraceCapturedInBackground ( ) ) ;
731-
732- // Check if cached metadata is already available
733- if ( model . metadataCached ) {
734- this . #platformMetadata = model . metadataCached ;
735- }
736725 } ,
737726 modelRemoved : ( _model : SDK . ReactNativeApplicationModel . ReactNativeApplicationModel ) => { } ,
738727 } ,
@@ -1211,6 +1200,9 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
12111200 if ( ! isNode && ! isReactNative ) {
12121201 this . showScreenshotsToolbarCheckbox =
12131202 this . createSettingCheckbox ( this . showScreenshotsSetting , i18nString ( UIStrings . captureScreenshots ) ) ;
1203+
1204+ // Hide this for now, this is to solve a timing problem with getting the platform metadata.
1205+ // This will be set back to visible only on Android.
12141206 this . showScreenshotsToolbarCheckbox . setVisible ( false ) ;
12151207 this . panelToolbar . appendToolbarItem ( this . showScreenshotsToolbarCheckbox ) ;
12161208 }
@@ -1409,13 +1401,6 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
14091401 this . timelinePane . element . appendChild ( this . fileSelectorElement ) ;
14101402 }
14111403
1412- /**
1413- * Helper method to check if the platform is Android
1414- */
1415- #isAndroid( ) : boolean {
1416- return this . #platformMetadata?. platform === 'Android' ;
1417- }
1418-
14191404 private contextMenu ( event : Event ) : void {
14201405 // Do not show this Context menu on FlameChart entries because we have a different context menu for FlameChart entries
14211406 const mouseEvent = ( event as MouseEvent ) ;
0 commit comments