forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
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 Expensify#37316 from shahinyan11/issue/36870
Fix displaying error message when image has been downloaded
- Loading branch information
Showing
6 changed files
with
53 additions
and
32 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,34 @@ | ||
diff --git a/node_modules/@react-native-camera-roll/camera-roll/android/build.gradle b/node_modules/@react-native-camera-roll/camera-roll/android/build.gradle | ||
index 6891fa3..8397f95 100644 | ||
--- a/node_modules/@react-native-camera-roll/camera-roll/android/build.gradle | ||
+++ b/node_modules/@react-native-camera-roll/camera-roll/android/build.gradle | ||
@@ -81,7 +81,9 @@ def findNodeModulePath(baseDir, packageName) { | ||
} | ||
|
||
def resolveReactNativeDirectory() { | ||
- def reactNative = file("${findNodeModulePath(rootProject.projectDir, "react-native")}") | ||
+ def projectDir = this.hasProperty('reactNativeProject') ? this.reactNativeProject : rootProject.projectDir | ||
+ def modulePath = file(projectDir); | ||
+ def reactNative = file("${findNodeModulePath(modulePath, 'react-native')}") | ||
if (reactNative.exists()) { | ||
return reactNative | ||
} | ||
diff --git a/node_modules/@react-native-camera-roll/camera-roll/ios/RNCCameraRoll.mm b/node_modules/@react-native-camera-roll/camera-roll/ios/RNCCameraRoll.mm | ||
index 4769d28..ef88a07 100644 | ||
--- a/node_modules/@react-native-camera-roll/camera-roll/ios/RNCCameraRoll.mm | ||
+++ b/node_modules/@react-native-camera-roll/camera-roll/ios/RNCCameraRoll.mm | ||
@@ -207,6 +207,14 @@ static void requestPhotoLibraryAccess(RCTPromiseRejectBlock reject, PhotosAuthor | ||
options.fetchLimit = 1; | ||
PHFetchResult<PHAsset *> *createdAsset = [PHAsset fetchAssetsWithLocalIdentifiers:@[placeholder.localIdentifier] | ||
options:options]; | ||
+ | ||
+ if (![createdAsset isKindOfClass:[PHAsset class]]) { | ||
+ resolve(@{ | ||
+ @"node": [NSNull null] | ||
+ }); | ||
+ return; | ||
+ } | ||
+ | ||
if (createdAsset.count < 1) { | ||
reject(kErrorUnableToSave, nil, nil); | ||
return; |
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