-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Add Rotate button to receipt modal #76037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
638754b
Add Rotate button to receipt modal
nkdengineer 81ff118
Merge branch 'main' into fix/75435
nkdengineer 7680cd6
refactor code
nkdengineer af03edd
run prettier
nkdengineer a744ed6
Merge branch 'main' into fix/75435
nkdengineer f91ac07
implement rotate for edit receipt
nkdengineer ccef491
fix eslint
nkdengineer 13b3212
fix perf comment
nkdengineer 54f00bd
Merge branch 'main' into fix/75435
nkdengineer c5490da
use splitExtensionFromFileName
nkdengineer b2af0cb
Merge branch 'main' into fix/75435
nkdengineer f898ba1
fix lint
nkdengineer 3ad8736
resolve conflict
nkdengineer 4520887
Merge branch 'main' into fix/75435
nkdengineer febaf75
fix issue on capture image
nkdengineer d8cf048
resolve conflict
nkdengineer 9f628e1
fix dependency
nkdengineer d78fc56
Merge branch 'main' into fix/75435
nkdengineer 9947961
Merge branch 'main' into fix/75435
nkdengineer 9442956
display a loading while rotating
nkdengineer 565dbdb
resolve conflict
nkdengineer e204525
remove disable lint
nkdengineer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,23 @@ | ||
| import RNFetchBlob from 'react-native-blob-util'; | ||
| import {splitExtensionFromFileName} from '@libs/fileDownload/FileUtils'; | ||
| import CONST from '@src/CONST'; | ||
|
|
||
| export default function fetchImage(source: string, authToken: string) { | ||
| // Create a unique filename based on timestamp | ||
| const timestamp = Date.now(); | ||
| const extension = splitExtensionFromFileName(source).fileExtension || CONST.IMAGE_FILE_FORMAT.JPG; | ||
| const filename = `temp_image_${timestamp}.${extension}`; | ||
| const path = `${RNFetchBlob.fs.dirs.CacheDir}/${filename}`; | ||
|
|
||
| return RNFetchBlob.config({ | ||
| fileCache: true, | ||
| path, | ||
| }) | ||
| .fetch('GET', source, { | ||
| [CONST.CHAT_ATTACHMENT_TOKEN_KEY]: authToken, | ||
| }) | ||
| .then((res) => { | ||
| // Return the file URI with file:// prefix for expo-image-manipulator | ||
| return `file://${res.path()}`; | ||
| }); | ||
| } |
This file contains hidden or 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,13 @@ | ||
| import CONST from '@src/CONST'; | ||
|
|
||
| export default function fetchImage(source: string, authToken: string) { | ||
| return fetch(source, { | ||
| headers: { | ||
| [CONST.CHAT_ATTACHMENT_TOKEN_KEY]: authToken, | ||
| }, | ||
| }) | ||
| .then((res) => res.blob()) | ||
| .then((blob) => { | ||
| return URL.createObjectURL(blob); | ||
| }); | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.