-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40777 from ShridharGoel/save-downloads
Save logs data in downloads and show meaningful path
- Loading branch information
Showing
8 changed files
with
97 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react'; | ||
import RNFS from 'react-native-fs'; | ||
import CONST from '@src/CONST'; | ||
import BaseProfilingToolMenu from './BaseProfilingToolMenu'; | ||
|
||
function ProfilingToolMenu() { | ||
return ( | ||
<BaseProfilingToolMenu | ||
pathToBeUsed={RNFS.DownloadDirectoryPath} | ||
displayPath={`${CONST.DOWNLOADS_PATH}`} | ||
/> | ||
); | ||
} | ||
|
||
ProfilingToolMenu.displayName = 'ProfilingToolMenu'; | ||
|
||
export default ProfilingToolMenu; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import RNFS from 'react-native-fs'; | ||
import useEnvironment from '@hooks/useEnvironment'; | ||
import getDownloadFolderPathSuffixForIOS from '@libs/getDownloadFolderPathSuffixForIOS'; | ||
import CONST from '@src/CONST'; | ||
import BaseProfilingToolMenu from './BaseProfilingToolMenu'; | ||
|
||
function ProfilingToolMenu() { | ||
const {environment} = useEnvironment(); | ||
|
||
return ( | ||
<BaseProfilingToolMenu | ||
pathToBeUsed={RNFS.DocumentDirectoryPath} | ||
displayPath={`${CONST.NEW_EXPENSIFY_PATH}${getDownloadFolderPathSuffixForIOS(environment)}`} | ||
/> | ||
); | ||
} | ||
|
||
ProfilingToolMenu.displayName = 'ProfilingToolMenu'; | ||
|
||
export default ProfilingToolMenu; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import CONST from '@src/CONST'; | ||
|
||
function getDownloadFolderPathSuffixForIOS(environment: string) { | ||
let folderSuffix = ''; | ||
|
||
switch (environment) { | ||
case CONST.ENVIRONMENT.PRODUCTION: | ||
folderSuffix = ''; | ||
break; | ||
case CONST.ENVIRONMENT.ADHOC: | ||
folderSuffix = CONST.ENVIRONMENT_SUFFIX.ADHOC; | ||
break; | ||
case CONST.ENVIRONMENT.DEV: | ||
folderSuffix = CONST.ENVIRONMENT_SUFFIX.DEV; | ||
break; | ||
default: | ||
folderSuffix = ''; | ||
break; | ||
} | ||
|
||
return folderSuffix; | ||
} | ||
|
||
export default getDownloadFolderPathSuffixForIOS; |