Skip to content

Commit

Permalink
feat(ios): add HippyFontChangeTriggerNotification for font update 2
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwcg committed Oct 11, 2024
1 parent 4d00b9d commit 09092a2
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,15 @@ - (void)dirtyText:(BOOL)needToDoLayout {
}

- (void)amendLayoutBeforeMount:(NSMutableSet<NativeRenderApplierBlock> *)blocks {
[super amendLayoutBeforeMount:blocks];

if (NativeRenderUpdateLifecycleComputed == _propagationLifecycle) {
return;
if (NativeRenderUpdateLifecycleComputed != _propagationLifecycle) {
//Set needs layout for font change event, etc.
NSNumber *currentTag = self.hippyTag;
[blocks addObject:^(NSDictionary<NSNumber *, UIView *> *viewRegistry, UIView * _Nullable lazyCreatedView) {
UIView *view = lazyCreatedView ?: viewRegistry[currentTag];
[view setNeedsLayout];
}];
}
//Set needs layout for font change event, etc.
NSNumber *currentTag = self.hippyTag;
[blocks addObject:^(NSDictionary<NSNumber *, UIView *> *viewRegistry, UIView * _Nullable lazyCreatedView) {
UIView *view = lazyCreatedView ?: viewRegistry[currentTag];
[view setNeedsLayout];
}];
[super amendLayoutBeforeMount:blocks];
}


Expand Down

0 comments on commit 09092a2

Please sign in to comment.