Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions front_end/panels/timeline/TimelinePanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,14 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
SDK.ReactNativeApplicationModel.ReactNativeApplicationModel,
{
modelAdded: (model: SDK.ReactNativeApplicationModel.ReactNativeApplicationModel) => {
model.addEventListener(
SDK.ReactNativeApplicationModel.Events.METADATA_UPDATED,
(event: Common.EventTarget.EventTargetEvent<Protocol.ReactNativeApplication.MetadataUpdatedEvent>) => {
if (event.data.platform === 'android') {
this.showScreenshotsToolbarCheckbox?.setVisible(true);
}
}
);
model.addEventListener(
SDK.ReactNativeApplicationModel.Events.TRACE_REQUESTED, () => this.rnPrepareForTraceCapturedInBackground());
},
Expand Down Expand Up @@ -1192,6 +1200,10 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
if (!isNode && (Root.Runtime.experiments.isEnabled(Root.Runtime.RNExperimentName.ENABLE_TIMELINE_FRAMES) || !isReactNative)) {
this.showScreenshotsToolbarCheckbox =
this.createSettingCheckbox(this.showScreenshotsSetting, i18nString(UIStrings.captureScreenshots));

// Hide this for now, this is to solve a timing problem with getting the platform metadata.
// This will be set back to visible only on Android.
this.showScreenshotsToolbarCheckbox.setVisible(false);
this.panelToolbar.appendToolbarItem(this.showScreenshotsToolbarCheckbox);
}

Expand Down
Loading