Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
42 lines
1.7 KiB
TypeScript
42 lines
1.7 KiB
TypeScript
// Module ID: 10941
|
|
// Function ID: 10942
|
|
// Name: getDeviceMediaPhotos
|
|
// Dependencies: [17, 3, 1231, 1364, 10942, 2]
|
|
// Exports: default
|
|
|
|
// Module 10941 (getDeviceMediaPhotos)
|
|
import LoggerDefault from "Logger" /* 3 */;
|
|
import _mod17 from "module_17" /* 17 */;
|
|
import SentryUtilsDefault from "SentryUtils" /* 1231 */;
|
|
import DCDPhotosDefault from "DCDPhotos" /* 10942 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const NativeModules = _mod17.NativeModules;
|
|
let closure_4 = new LoggerDefault("DeviceMedia.tsx");
|
|
const result = size.fileFinishedImporting("modules/device/native/getDeviceMediaPhotos.tsx");
|
|
|
|
export default function getDeviceMediaPhotos(arg0) {
|
|
({ batchSize, extensions, onFetched, onError } = arg0);
|
|
({ endCursor, lastAssetIndex, lastNodeImageUri } = arg0);
|
|
if (onError === undefined) {
|
|
onError = function u(error) {
|
|
logger.log("CameraRollUtils -- Failed to get photos with error " + error);
|
|
SentryUtilsDefault.captureException(error, { tags: { source: "DEVICE_MEDIA" } });
|
|
};
|
|
}
|
|
if (obj.isIOS()) {
|
|
const obj3 = DCDPhotosDefault;
|
|
if (obj3 != null) {
|
|
const obj2 = { first: batchSize, groupTypes: "Recents", assetType: "All", after: endCursor, extensions };
|
|
const photos = obj3.getPhotos(obj2);
|
|
photos.then(onFetched).catch(onError);
|
|
const nextPromise = photos.then(onFetched);
|
|
}
|
|
} else {
|
|
const CameraRollUtils = NativeModules.CameraRollUtils;
|
|
const obj4 = { first: batchSize, assetType: "All", after: lastNodeImageUri, offset: lastAssetIndex, extensions };
|
|
const photos1 = CameraRollUtils.getPhotos(obj4);
|
|
photos1.then(onFetched).catch(onError);
|
|
const nextPromise1 = photos1.then(onFetched);
|
|
}
|
|
};
|