status-react/patches/CameraRoll.ts.patch
Siddarth Kumar 44732e9736
upgrade camera-roll lib to 7.5.2 (#19664)
This commit swaps the fork of @react-native-camera-roll/camera-roll with a patch and upgrades this library to the latest version.

needed for : https://github.com/status-im/status-mobile/issues/18138

Verify if camera album related features still work.

- iOS

status: ready
2024-04-17 17:14:18 +02:00

23 lines
757 B
Diff

--- /tmp/tmp-status-mobile-3907e6b2e/tmp.re8kHerusA/CameraRoll.ts 2024-04-16 15:17:12.942432000 +0200
+++ ./node_modules/@react-native-camera-roll/camera-roll/src/CameraRoll.ts 2024-04-16 15:17:42.455250986 +0200
@@ -239,6 +239,19 @@
}
/**
+ * Returns total iOS image count
+ */
+ static getPhotosCountiOS(): Promise<number> {
+ return RNCCameraRoll.getPhotosCountiOS('');
+ }
+ /**
+ * Returns favorites and their count iOS
+ */
+ static getFavoritesiOS(): Promise<Album> {
+ return RNCCameraRoll.getFavoritesiOS('');
+ }
+
+ /**
* Saves the photo or video to the camera roll or photo library, and returns the URI of the newly created asset.
*
* @deprecated `save(...)` is deprecated - use `saveAsset(...)` instead.