Skip to content

Commit

Permalink
chore(ios): clean up obsolete functions
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwcg committed Mar 27, 2024
1 parent 6e2844e commit 3c41957
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 26 deletions.
16 changes: 1 addition & 15 deletions renderer/native/ios/renderer/HippyUIManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -705,19 +705,6 @@ - (void)addUIBlock:(HippyViewManagerUIBlock)block {
[_pendingUIBlocks addObject:block];
}
- (void)amendPendingUIBlocksWithStylePropagationUpdateForRenderObject:(HippyShadowView *)topView {
NSMutableSet<NativeRenderApplierBlock> *applierBlocks = [NSMutableSet setWithCapacity:256];
[topView collectUpdatedProperties:applierBlocks parentProperties:@{}];
if (applierBlocks.count) {
[self addUIBlock:^(__unused HippyUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
for (NativeRenderApplierBlock block in applierBlocks) {
block(viewRegistry, nil);
}
}];
}
}
- (void)flushUIBlocksOnRootNode:(std::weak_ptr<RootNode>)rootNode {
// First copy the previous blocks into a temporary variable, then reset the
// pending blocks to a new array. This guards against mutation while
Expand Down Expand Up @@ -1499,8 +1486,7 @@ - (void)layoutAndMountOnRootNode:(std::weak_ptr<RootNode>)rootNode {
}];
}
[self addUIBlock:^(HippyUIManager *uiManager, __unused NSDictionary<NSNumber *, UIView *> *viewRegistry) {
NSSet<id<HippyComponent>> *nodes = [uiManager->_componentTransactionListeners copy];
for (id<HippyComponent> node in nodes) {
for (id<HippyComponent> node in uiManager->_componentTransactionListeners) {
[node hippyBridgeDidFinishTransaction];
}
}];
Expand Down
8 changes: 0 additions & 8 deletions renderer/native/ios/renderer/component/view/HippyShadowView.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,6 @@ typedef void (^HippyViewInsertionBlock)(UIView *container, NSArray<UIView *> *ch
- (void)setLayoutFrame:(CGRect)frame;
- (void)setLayoutFrame:(CGRect)frame dirtyPropagation:(BOOL)dirtyPropagation;

/**
* Calculate property changes that need to be propagated to the view.
* The applierBlocks set contains NativeRenderApplierBlock functions that must be applied
* on the main thread in order to update the view.
*/
- (void)collectUpdatedProperties:(NSMutableSet<NativeRenderApplierBlock> *)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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@ - (void)amendLayoutBeforeMount:(NSMutableSet<NativeRenderApplierBlock> *)blocks
return parentProperties;
}

- (void)collectUpdatedProperties:(NSMutableSet<NativeRenderApplierBlock> *)applierBlocks parentProperties:(NSDictionary<NSString *, id> *)parentProperties {
}

- (instancetype)init {
if ((self = [super init])) {
_propagationLifecycle = NativeRenderUpdateLifecycleUninitialized;
Expand Down

0 comments on commit 3c41957

Please sign in to comment.