mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fabric: Enforcing RCTImageResponseDelegate conformance
Summary: For `RCTSliderComponentView` the conformance to the protocol wasn't enforced. For `RCTImageComponentView` it was in .h file without a need to be exported. Reviewed By: sammy-SC Differential Revision: D17923550 fbshipit-source-id: d98b892d24d9079a7109dc7d881c5c5a175fe3bf
This commit is contained in:
committed by
Facebook Github Bot
parent
14df0b2a78
commit
23564ab44d
@@ -5,15 +5,14 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <React/RCTImageResponseDelegate.h>
|
||||
#import "RCTViewComponentView.h"
|
||||
#import <React/RCTViewComponentView.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* UIView class for root <Image> component.
|
||||
*/
|
||||
@interface RCTImageComponentView : RCTViewComponentView <RCTImageResponseDelegate>
|
||||
@interface RCTImageComponentView : RCTViewComponentView
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#import "RCTImageComponentView.h"
|
||||
|
||||
#import <React/RCTImageResponseDelegate.h>
|
||||
#import <React/RCTImageResponseObserverProxy.h>
|
||||
#import <react/components/image/ImageComponentDescriptor.h>
|
||||
#import <react/components/image/ImageEventEmitter.h>
|
||||
@@ -17,6 +18,9 @@
|
||||
|
||||
#import "RCTConversions.h"
|
||||
|
||||
@interface RCTImageComponentView () <RCTImageResponseDelegate>
|
||||
@end
|
||||
|
||||
@implementation RCTImageComponentView {
|
||||
UIImageView *_imageView;
|
||||
SharedImageLocalData _imageLocalData;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#import "RCTSliderComponentView.h"
|
||||
|
||||
#import <React/RCTImageResponseDelegate.h>
|
||||
#import <React/RCTImageResponseObserverProxy.h>
|
||||
#import <react/components/rncore/EventEmitters.h>
|
||||
#import <react/components/rncore/Props.h>
|
||||
@@ -15,6 +16,9 @@
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
@interface RCTSliderComponentView () <RCTImageResponseDelegate>
|
||||
@end
|
||||
|
||||
@implementation RCTSliderComponentView {
|
||||
UISlider *_sliderView;
|
||||
float _previousValue;
|
||||
@@ -312,7 +316,7 @@ using namespace facebook::react;
|
||||
|
||||
#pragma mark - RCTImageResponseDelegate
|
||||
|
||||
- (void)didReceiveImage:(UIImage *)image fromObserver:(void *)observer
|
||||
- (void)didReceiveImage:(UIImage *)image fromObserver:(void const *)observer
|
||||
{
|
||||
if (observer == _trackImageResponseObserverProxy.get()) {
|
||||
self.trackImage = image;
|
||||
@@ -325,11 +329,11 @@ using namespace facebook::react;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)didReceiveProgress:(float)progress fromObserver:(void *)observer
|
||||
- (void)didReceiveProgress:(float)progress fromObserver:(void const *)observer
|
||||
{
|
||||
}
|
||||
|
||||
- (void)didReceiveFailureFromObserver:(void *)observer
|
||||
- (void)didReceiveFailureFromObserver:(void const *)observer
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user