From 3c419574b9e90326640241426b567bbf16ff64fa Mon Sep 17 00:00:00 2001 From: wwwcg Date: Mon, 25 Mar 2024 17:44:49 +0800 Subject: [PATCH] chore(ios): clean up obsolete functions --- renderer/native/ios/renderer/HippyUIManager.mm | 16 +--------------- .../renderer/component/view/HippyShadowView.h | 8 -------- .../renderer/component/view/HippyShadowView.mm | 3 --- 3 files changed, 1 insertion(+), 26 deletions(-) diff --git a/renderer/native/ios/renderer/HippyUIManager.mm b/renderer/native/ios/renderer/HippyUIManager.mm index cbfca1db609..316b6407ac9 100644 --- a/renderer/native/ios/renderer/HippyUIManager.mm +++ b/renderer/native/ios/renderer/HippyUIManager.mm @@ -705,19 +705,6 @@ - (void)addUIBlock:(HippyViewManagerUIBlock)block { [_pendingUIBlocks addObject:block]; } -- (void)amendPendingUIBlocksWithStylePropagationUpdateForRenderObject:(HippyShadowView *)topView { - NSMutableSet *applierBlocks = [NSMutableSet setWithCapacity:256]; - - [topView collectUpdatedProperties:applierBlocks parentProperties:@{}]; - if (applierBlocks.count) { - [self addUIBlock:^(__unused HippyUIManager *uiManager, NSDictionary *viewRegistry) { - for (NativeRenderApplierBlock block in applierBlocks) { - block(viewRegistry, nil); - } - }]; - } -} - - (void)flushUIBlocksOnRootNode:(std::weak_ptr)rootNode { // First copy the previous blocks into a temporary variable, then reset the // pending blocks to a new array. This guards against mutation while @@ -1499,8 +1486,7 @@ - (void)layoutAndMountOnRootNode:(std::weak_ptr)rootNode { }]; } [self addUIBlock:^(HippyUIManager *uiManager, __unused NSDictionary *viewRegistry) { - NSSet> *nodes = [uiManager->_componentTransactionListeners copy]; - for (id node in nodes) { + for (id node in uiManager->_componentTransactionListeners) { [node hippyBridgeDidFinishTransaction]; } }]; diff --git a/renderer/native/ios/renderer/component/view/HippyShadowView.h b/renderer/native/ios/renderer/component/view/HippyShadowView.h index eaf4d86fd49..df00d7a953b 100644 --- a/renderer/native/ios/renderer/component/view/HippyShadowView.h +++ b/renderer/native/ios/renderer/component/view/HippyShadowView.h @@ -143,14 +143,6 @@ typedef void (^HippyViewInsertionBlock)(UIView *container, NSArray *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 *)applierBlocks - parentProperties:(NSDictionary *)parentProperties; - /** * Process the updated properties and apply them to view. Shadow view classes * that add additional propagating properties should override this method. diff --git a/renderer/native/ios/renderer/component/view/HippyShadowView.mm b/renderer/native/ios/renderer/component/view/HippyShadowView.mm index 3688d2a04f1..dc565ff3b07 100644 --- a/renderer/native/ios/renderer/component/view/HippyShadowView.mm +++ b/renderer/native/ios/renderer/component/view/HippyShadowView.mm @@ -91,9 +91,6 @@ - (void)amendLayoutBeforeMount:(NSMutableSet *)blocks return parentProperties; } -- (void)collectUpdatedProperties:(NSMutableSet *)applierBlocks parentProperties:(NSDictionary *)parentProperties { -} - - (instancetype)init { if ((self = [super init])) { _propagationLifecycle = NativeRenderUpdateLifecycleUninitialized;