mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 01:40:08 +00: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:
parent
b48f7e5605
commit
cff522d283
@ -13,6 +13,7 @@
|
||||
#import <React/RCTShadowView+Layout.h>
|
||||
#import <React/RCTShadowView.h>
|
||||
#import <React/RCTUIManager.h>
|
||||
#import <React/RCTUIManagerUtils.h>
|
||||
#import <React/RCTUIManagerObserverCoordinator.h>
|
||||
|
||||
#import "RCTTextShadowView.h"
|
||||
@ -83,12 +84,15 @@ RCT_EXPORT_VIEW_PROPERTY(selectable, BOOL)
|
||||
{
|
||||
CGFloat fontSizeMultiplier = self.bridge.accessibilityManager.multiplier;
|
||||
|
||||
for (RCTTextShadowView *shadowView in _shadowViews) {
|
||||
shadowView.textAttributes.fontSizeMultiplier = fontSizeMultiplier;
|
||||
[shadowView dirtyLayout];
|
||||
}
|
||||
NSHashTable<RCTTextShadowView *> *shadowViews = _shadowViews;
|
||||
RCTExecuteOnUIManagerQueue(^{
|
||||
for (RCTTextShadowView *shadowView in shadowViews) {
|
||||
shadowView.textAttributes.fontSizeMultiplier = fontSizeMultiplier;
|
||||
[shadowView dirtyLayout];
|
||||
}
|
||||
|
||||
[self.bridge.uiManager setNeedsLayout];
|
||||
[self.bridge.uiManager setNeedsLayout];
|
||||
});
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user