Skip to content

Commit 0f9fc4b

Browse files
sherginfacebook-github-bot
authored andcommitted
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
1 parent ce50f25 commit 0f9fc4b

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

React/Views/RCTShadowView.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@
1616
@class RCTRootShadowView;
1717
@class RCTSparseArray;
1818

19-
typedef NS_ENUM(NSUInteger, RCTUpdateLifecycle) {
20-
RCTUpdateLifecycleUninitialized = 0,
21-
RCTUpdateLifecycleComputed,
22-
RCTUpdateLifecycleDirtied,
23-
};
24-
2519
typedef void (^RCTApplierBlock)(NSDictionary<NSNumber *, UIView *> *viewRegistry);
2620

2721
/**
@@ -190,21 +184,6 @@ typedef void (^RCTApplierBlock)(NSDictionary<NSNumber *, UIView *> *viewRegistry
190184
*/
191185
@property (nonatomic, assign) CGSize intrinsicContentSize;
192186

193-
/**
194-
* Calculate property changes that need to be propagated to the view.
195-
* The applierBlocks set contains RCTApplierBlock functions that must be applied
196-
* on the main thread in order to update the view.
197-
*/
198-
- (void)collectUpdatedProperties:(NSMutableSet<RCTApplierBlock> *)applierBlocks
199-
parentProperties:(NSDictionary<NSString *, id> *)parentProperties;
200-
201-
/**
202-
* Process the updated properties and apply them to view. Shadow view classes
203-
* that add additional propagating properties should override this method.
204-
*/
205-
- (NSDictionary<NSString *, id> *)processUpdatedProperties:(NSMutableSet<RCTApplierBlock> *)applierBlocks
206-
parentProperties:(NSDictionary<NSString *, id> *)parentProperties NS_REQUIRES_SUPER;
207-
208187
/**
209188
* Can be called by a parent on a child in order to calculate all views whose frame needs
210189
* updating in that branch. Adds these frames to `viewsWithNewFrame`. Useful if layout

React/Views/RCTShadowView.m

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ typedef NS_ENUM(unsigned int, meta_prop_t) {
3434

3535
@implementation RCTShadowView
3636
{
37-
RCTUpdateLifecycle _propagationLifecycle;
38-
RCTUpdateLifecycle _textLifecycle;
3937
NSDictionary *_lastParentProperties;
4038
NSMutableArray<RCTShadowView *> *_reactSubviews;
4139
BOOL _recomputePadding;
@@ -264,26 +262,6 @@ - (void)applyLayoutToChildren:(YGNodeRef)node
264262
}
265263
}
266264

267-
- (NSDictionary<NSString *, id> *)processUpdatedProperties:(NSMutableSet<RCTApplierBlock> *)applierBlocks
268-
parentProperties:(NSDictionary<NSString *, id> *)parentProperties
269-
{
270-
return parentProperties;
271-
}
272-
273-
- (void)collectUpdatedProperties:(NSMutableSet<RCTApplierBlock> *)applierBlocks
274-
parentProperties:(NSDictionary<NSString *, id> *)parentProperties
275-
{
276-
if (_propagationLifecycle == RCTUpdateLifecycleComputed && [parentProperties isEqualToDictionary:_lastParentProperties]) {
277-
return;
278-
}
279-
_propagationLifecycle = RCTUpdateLifecycleComputed;
280-
_lastParentProperties = parentProperties;
281-
NSDictionary<NSString *, id> *nextProps = [self processUpdatedProperties:applierBlocks parentProperties:parentProperties];
282-
for (RCTShadowView *child in _reactSubviews) {
283-
[child collectUpdatedProperties:applierBlocks parentProperties:nextProps];
284-
}
285-
}
286-
287265
- (void)collectUpdatedFrames:(NSMutableSet<RCTShadowView *> *)viewsWithNewFrame
288266
withFrame:(CGRect)frame
289267
hidden:(BOOL)hidden
@@ -354,8 +332,6 @@ - (instancetype)init
354332
_intrinsicContentSize = CGSizeMake(UIViewNoIntrinsicMetric, UIViewNoIntrinsicMetric);
355333

356334
_newView = YES;
357-
_propagationLifecycle = RCTUpdateLifecycleUninitialized;
358-
_textLifecycle = RCTUpdateLifecycleUninitialized;
359335

360336
_reactSubviews = [NSMutableArray array];
361337

0 commit comments

Comments
 (0)