fix: Making Promise return types consistent across iOS and Android, updating types to match. (#137)

This commit is contained in:
Kevin Brown
2020-02-05 17:21:59 +08:00
committed by GitHub
parent 75b4208474
commit b49dc8e631
2 changed files with 2 additions and 2 deletions
@@ -594,7 +594,7 @@ public class CameraRollModule extends ReactContextBaseJavaModule {
cursor.close();
if (deletedCount == mUris.size()) {
mPromise.resolve(null);
mPromise.resolve(true);
} else {
mPromise.reject(ERROR_UNABLE_TO_DELETE,
"Could not delete all media, only deleted " + deletedCount + " photos.");
+1 -1
View File
@@ -75,7 +75,7 @@ declare namespace CameraRoll {
/**
* Delete a photo from the camera roll or media library. photoUris is an array of photo uri's.
*/
function deletePhotos(photoUris: Array<string>): void;
function deletePhotos(photoUris: Array<string>): Promise<boolean>;
/**
* Saves the photo or video to the camera roll or photo library.