mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
xplat/js/react-native-github/packages/react-native/Libraries/Blob/RCTFileReaderModule.mm (#57847)
Summary: Pull Request resolved: https://github.com/react/react-native/pull/57847 ...build_codegen_spec built the RCTBlobApple target and I read the generated `protocol NativeFileReaderModuleSpec` from FBReactNativeSpec.h; (2) apply_cast_mod mechanically rewrote both async methods — no FLAG lines emitted; (3) buck_build_verify succeeded; (4) Lint reported no issues. _____ * Do **NOT** post in the CodemodService Feedback group about this specific diff. * If you have feedback, comment on the diff and use an appropriate diff action. This [diff was created](https://www.internalfb.com/intern/sandcastle/job/31525200232184606/) with [CodemodService](https://www.internalfb.com/codemod_service/CodemodConfigDevmateDropRctExportMethod). Reviewed By: christophpurrer Differential Revision: D115001596 fbshipit-source-id: ae15a11e986296169fbcb31cf65d1ca58953c396
This commit is contained in:
1 parent
85a81818c6
commit
4bf9d4e9b0
1 file changed
+7
-6
@@ -24,9 +24,10 @@ RCT_EXPORT_MODULE(FileReaderModule)
|
||||
|
||||
@synthesize moduleRegistry = _moduleRegistry;
|
||||
|
||||
RCT_EXPORT_METHOD(
|
||||
readAsText : (NSDictionary<NSString *, id> *)blob encoding : (NSString *)encoding resolve : (RCTPromiseResolveBlock)
|
||||
resolve reject : (RCTPromiseRejectBlock)reject)
|
||||
- (void)readAsText:(NSDictionary<NSString *, id> *)blob
|
||||
encoding:(NSString *)encoding
|
||||
resolve:(RCTPromiseResolveBlock)resolve
|
||||
reject:(RCTPromiseRejectBlock)reject
|
||||
{
|
||||
RCTBlobManager *blobManager = [_moduleRegistry moduleForName:"BlobModule"];
|
||||
dispatch_async(blobManager.methodQueue, ^{
|
||||
@@ -54,9 +55,9 @@ RCT_EXPORT_METHOD(
|
||||
});
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(
|
||||
readAsDataURL : (NSDictionary<NSString *, id> *)blob resolve : (RCTPromiseResolveBlock)
|
||||
resolve reject : (RCTPromiseRejectBlock)reject)
|
||||
- (void)readAsDataURL:(NSDictionary<NSString *, id> *)blob
|
||||
resolve:(RCTPromiseResolveBlock)resolve
|
||||
reject:(RCTPromiseRejectBlock)reject
|
||||
{
|
||||
RCTBlobManager *blobManager = [_moduleRegistry moduleForName:"BlobModule"];
|
||||
dispatch_async(blobManager.methodQueue, ^{
|
||||
|
||||
Reference in new issue
Block a user