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 20:21:59 +11:00 committed by GitHub
parent 75b4208474
commit b49dc8e631
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -594,7 +594,7 @@ public class CameraRollModule extends ReactContextBaseJavaModule {
cursor.close(); cursor.close();
if (deletedCount == mUris.size()) { if (deletedCount == mUris.size()) {
mPromise.resolve(null); mPromise.resolve(true);
} else { } else {
mPromise.reject(ERROR_UNABLE_TO_DELETE, mPromise.reject(ERROR_UNABLE_TO_DELETE,
"Could not delete all media, only deleted " + deletedCount + " photos."); "Could not delete all media, only deleted " + deletedCount + " photos.");

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. * 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. * Saves the photo or video to the camera roll or photo library.