mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-22 19:48:56 +08:00
Dirty text shadow nodes on UIManager queue after multiplier changes
Summary: Letting them fire on whatever queue we get the notification from throws an assert. Reviewed By: shergin Differential Revision: D7002789 fbshipit-source-id: 669474af1a07f0df6784b69b54afe0152c1ba3c4
This commit is contained in:
committed by
Facebook Github Bot
parent
b48f7e5605
commit
cff522d283
@@ -16,6 +16,7 @@
|
||||
#import <React/RCTShadowView+Layout.h>
|
||||
#import <React/RCTShadowView.h>
|
||||
#import <React/RCTUIManager.h>
|
||||
#import <React/RCTUIManagerUtils.h>
|
||||
#import <React/RCTUIManagerObserverCoordinator.h>
|
||||
|
||||
#import "RCTBaseTextInputShadowView.h"
|
||||
@@ -109,12 +110,15 @@ RCT_EXPORT_SHADOW_PROPERTY(onContentSizeChange, RCTBubblingEventBlock)
|
||||
{
|
||||
CGFloat fontSizeMultiplier = self.bridge.accessibilityManager.multiplier;
|
||||
|
||||
for (RCTBaseTextInputShadowView *shadowView in _shadowViews) {
|
||||
shadowView.textAttributes.fontSizeMultiplier = fontSizeMultiplier;
|
||||
[shadowView dirtyLayout];
|
||||
}
|
||||
NSHashTable<RCTBaseTextInputShadowView *> *shadowViews = _shadowViews;
|
||||
RCTExecuteOnUIManagerQueue(^{
|
||||
for (RCTBaseTextInputShadowView *shadowView in shadowViews) {
|
||||
shadowView.textAttributes.fontSizeMultiplier = fontSizeMultiplier;
|
||||
[shadowView dirtyLayout];
|
||||
}
|
||||
|
||||
[self.bridge.uiManager setNeedsLayout];
|
||||
[self.bridge.uiManager setNeedsLayout];
|
||||
});
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user