mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 01:40:08 +00:00
processUpdatedProperties
& collectUpdatedProperties
was removed from RCTShadowView
Summary: This is leftovers from last <Text> reimplementation; nobody uses it and it does not hooked up with UIManager. Reviewed By: fkgozali Differential Revision: D6887795 fbshipit-source-id: 9e2e29af4ba959270096eeb494666d1cacaeba32
This commit is contained in:
parent
ce50f25d22
commit
0f9fc4b295
@ -16,12 +16,6 @@
|
||||
@class RCTRootShadowView;
|
||||
@class RCTSparseArray;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, RCTUpdateLifecycle) {
|
||||
RCTUpdateLifecycleUninitialized = 0,
|
||||
RCTUpdateLifecycleComputed,
|
||||
RCTUpdateLifecycleDirtied,
|
||||
};
|
||||
|
||||
typedef void (^RCTApplierBlock)(NSDictionary<NSNumber *, UIView *> *viewRegistry);
|
||||
|
||||
/**
|
||||
@ -190,21 +184,6 @@ typedef void (^RCTApplierBlock)(NSDictionary<NSNumber *, UIView *> *viewRegistry
|
||||
*/
|
||||
@property (nonatomic, assign) CGSize intrinsicContentSize;
|
||||
|
||||
/**
|
||||
* Calculate property changes that need to be propagated to the view.
|
||||
* The applierBlocks set contains RCTApplierBlock functions that must be applied
|
||||
* on the main thread in order to update the view.
|
||||
*/
|
||||
- (void)collectUpdatedProperties:(NSMutableSet<RCTApplierBlock> *)applierBlocks
|
||||
parentProperties:(NSDictionary<NSString *, id> *)parentProperties;
|
||||
|
||||
/**
|
||||
* Process the updated properties and apply them to view. Shadow view classes
|
||||
* that add additional propagating properties should override this method.
|
||||
*/
|
||||
- (NSDictionary<NSString *, id> *)processUpdatedProperties:(NSMutableSet<RCTApplierBlock> *)applierBlocks
|
||||
parentProperties:(NSDictionary<NSString *, id> *)parentProperties NS_REQUIRES_SUPER;
|
||||
|
||||
/**
|
||||
* Can be called by a parent on a child in order to calculate all views whose frame needs
|
||||
* updating in that branch. Adds these frames to `viewsWithNewFrame`. Useful if layout
|
||||
|
@ -34,8 +34,6 @@ typedef NS_ENUM(unsigned int, meta_prop_t) {
|
||||
|
||||
@implementation RCTShadowView
|
||||
{
|
||||
RCTUpdateLifecycle _propagationLifecycle;
|
||||
RCTUpdateLifecycle _textLifecycle;
|
||||
NSDictionary *_lastParentProperties;
|
||||
NSMutableArray<RCTShadowView *> *_reactSubviews;
|
||||
BOOL _recomputePadding;
|
||||
@ -264,26 +262,6 @@ static void RCTProcessMetaPropsBorder(const YGValue metaProps[META_PROP_COUNT],
|
||||
}
|
||||
}
|
||||
|
||||
- (NSDictionary<NSString *, id> *)processUpdatedProperties:(NSMutableSet<RCTApplierBlock> *)applierBlocks
|
||||
parentProperties:(NSDictionary<NSString *, id> *)parentProperties
|
||||
{
|
||||
return parentProperties;
|
||||
}
|
||||
|
||||
- (void)collectUpdatedProperties:(NSMutableSet<RCTApplierBlock> *)applierBlocks
|
||||
parentProperties:(NSDictionary<NSString *, id> *)parentProperties
|
||||
{
|
||||
if (_propagationLifecycle == RCTUpdateLifecycleComputed && [parentProperties isEqualToDictionary:_lastParentProperties]) {
|
||||
return;
|
||||
}
|
||||
_propagationLifecycle = RCTUpdateLifecycleComputed;
|
||||
_lastParentProperties = parentProperties;
|
||||
NSDictionary<NSString *, id> *nextProps = [self processUpdatedProperties:applierBlocks parentProperties:parentProperties];
|
||||
for (RCTShadowView *child in _reactSubviews) {
|
||||
[child collectUpdatedProperties:applierBlocks parentProperties:nextProps];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)collectUpdatedFrames:(NSMutableSet<RCTShadowView *> *)viewsWithNewFrame
|
||||
withFrame:(CGRect)frame
|
||||
hidden:(BOOL)hidden
|
||||
@ -354,8 +332,6 @@ static void RCTProcessMetaPropsBorder(const YGValue metaProps[META_PROP_COUNT],
|
||||
_intrinsicContentSize = CGSizeMake(UIViewNoIntrinsicMetric, UIViewNoIntrinsicMetric);
|
||||
|
||||
_newView = YES;
|
||||
_propagationLifecycle = RCTUpdateLifecycleUninitialized;
|
||||
_textLifecycle = RCTUpdateLifecycleUninitialized;
|
||||
|
||||
_reactSubviews = [NSMutableArray array];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user