Skip to content

Commit 6d34b7a

Browse files
generatedunixname1612842167096234meta-codesync[bot]
authored andcommitted
xplat/js/react-native-github/packages/react-native/Libraries/Image/RCTImageStoreManager.mm (#57842)
Summary: Pull Request resolved: #57842 ...build_codegen_spec to generate the NativeImageStoreIOSSpec protocol and confirmed the module is a TurboModule. 2. Located and quoted the generated protocol signatures (all args NSString */RCTResponseSenderBlock). 3. Ran apply_cast_mod, which converted all four RCT_EXPORT_METHOD methods to plain ObjC declarations with zero FLAG lines (no type mismatches, so no RCTConvert reconciliation required). 4. Left RCT_EXPORT_MODULE() untouched. 5. Ran buck_build_verify (BUILD SUCCEEDED) and Lint (no lints found). _____ * 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: cortinico, christophpurrer Differential Revision: D115003202 fbshipit-source-id: 964528bdbad4a82c21096d4d8ca16588fe17514b
1 parent 4bf9d4e commit 6d34b7a

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

packages/react-native/Libraries/Image/RCTImageStoreManager.mm

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,20 +95,20 @@ - (void)storeImage:(UIImage *)image withBlock:(void (^)(NSString *imageTag))bloc
9595
});
9696
}
9797

98-
RCT_EXPORT_METHOD(removeImageForTag : (NSString *)imageTag)
98+
- (void)removeImageForTag:(NSString *)imageTag
9999
{
100100
[_store removeObjectForKey:imageTag];
101101
}
102102

103-
RCT_EXPORT_METHOD(hasImageForTag : (NSString *)imageTag callback : (RCTResponseSenderBlock)callback)
103+
- (void)hasImageForTag:(NSString *)imageTag callback:(RCTResponseSenderBlock)callback
104104
{
105105
callback(@[ @(_store[imageTag] != nil) ]);
106106
}
107107

108108
// TODO (#5906496): Name could be more explicit - something like getBase64EncodedDataForTag:?
109-
RCT_EXPORT_METHOD(
110-
getBase64ForTag : (NSString *)imageTag successCallback : (RCTResponseSenderBlock)
111-
successCallback errorCallback : (RCTResponseSenderBlock)errorCallback)
109+
- (void)getBase64ForTag:(NSString *)imageTag
110+
successCallback:(RCTResponseSenderBlock)successCallback
111+
errorCallback:(RCTResponseSenderBlock)errorCallback
112112
{
113113
NSData *imageData = _store[imageTag];
114114
if (imageData == nullptr) {
@@ -122,9 +122,9 @@ - (void)storeImage:(UIImage *)image withBlock:(void (^)(NSString *imageTag))bloc
122122
});
123123
}
124124

125-
RCT_EXPORT_METHOD(
126-
addImageFromBase64 : (NSString *)base64String successCallback : (RCTResponseSenderBlock)
127-
successCallback errorCallback : (RCTResponseSenderBlock)errorCallback)
125+
- (void)addImageFromBase64:(NSString *)base64String
126+
successCallback:(RCTResponseSenderBlock)successCallback
127+
errorCallback:(RCTResponseSenderBlock)errorCallback
128128

129129
{
130130
// Dispatching to a background thread to perform base64 decoding

0 commit comments

Comments
 (0)