Skip to content

Commit 58b28b4

Browse files
committed
apply reviewers suggestions
1 parent 9100596 commit 58b28b4

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

src/components/RecordTroubleshootDataToolMenu/BaseRecordTroubleshootDataToolMenu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function BaseRecordTroubleshootDataToolMenu({
8787
const styles = useThemeStyles();
8888
const [shouldRecordTroubleshootData] = useOnyx(ONYXKEYS.SHOULD_RECORD_TROUBLESHOOT_DATA, {canBeMissing: true});
8989
const [capturedLogs] = useOnyx(ONYXKEYS.LOGS, {canBeMissing: true});
90-
const [isProfilingInProgress = false] = useOnyx(ONYXKEYS.APP_PROFILING_IN_PROGRESS, {canBeMissing: true});
90+
const [isProfilingInProgress] = useOnyx(ONYXKEYS.APP_PROFILING_IN_PROGRESS, {canBeMissing: true});
9191
const [shareUrls, setShareUrls] = useState<string[]>();
9292
const [isDisabled, setIsDisabled] = useState<boolean>(false);
9393

@@ -103,7 +103,7 @@ function BaseRecordTroubleshootDataToolMenu({
103103
} else {
104104
Performance.disableMonitoring();
105105
}
106-
toggleProfileTool({isProfilingInProgress});
106+
toggleProfileTool(isProfilingInProgress);
107107
return () => {
108108
Performance.disableMonitoring();
109109
};

src/libs/actions/ProfilingTool.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@ import Onyx from 'react-native-onyx';
33
import CONST from '@src/CONST';
44
import ONYXKEYS from '@src/ONYXKEYS';
55

6-
type ToggleProfileToolParams = {
7-
isProfilingInProgress: boolean;
8-
};
9-
106
/**
117
* Toggle the test tools modal open or closed.
128
* Throttle the toggle to make the modal stay open if you accidentally tap an extra time, which is easy to do.
139
*/
14-
function toggleProfileTool({isProfilingInProgress}: ToggleProfileToolParams) {
10+
function toggleProfileTool(isProfilingInProgress = false) {
1511
const toggle = () => Onyx.set(ONYXKEYS.APP_PROFILING_IN_PROGRESS, isProfilingInProgress);
1612
const throttledToggle = throttle(toggle, CONST.TIMING.TEST_TOOLS_MODAL_THROTTLE_TIME);
1713
throttledToggle();

0 commit comments

Comments
 (0)