fix: Making Promise return types consistent across iOS and Android, updating types to match. (#137)
This commit is contained in:
parent
75b4208474
commit
b49dc8e631
|
@ -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.");
|
||||||
|
|
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue