Make disk cache inspection toggleable

Summary: Adds a toggle switch to show/hide disk cache images defaulting to inactive. The image data is only sent on the adb connection when the toggle is activated.

Reviewed By: defHLT

Differential Revision: D20002059

fbshipit-source-id: 05c9e515ffe09441e5cfb6f66eb14559ac4a322c
This commit is contained in:
Mathias Fleig Mortensen
2020-07-27 09:43:25 -07:00
committed by Facebook GitHub Bot
parent cfcb6837d1
commit e466bc4aed
5 changed files with 62 additions and 32 deletions

View File

@@ -87,6 +87,8 @@ type ImagesCacheOverviewProps = {
events: Array<ImageEventWithId>;
onTrackLeaks: (enabled: boolean) => void;
isLeakTrackingEnabled: boolean;
onShowDiskImages: (enabled: boolean) => void;
showDiskImages: boolean;
};
type ImagesCacheOverviewState = {
@@ -231,6 +233,11 @@ export default class ImagesCacheOverview extends PureComponent<
onClick={this.props.onTrackLeaks}
label="Track Leaks"
/>
<Toggle
toggled={this.props.showDiskImages}
onClick={this.props.onShowDiskImages}
label="Show Disk Images"
/>
<Spacer />
<input
type="range"