mattermost-mobile/patches/react-native+0.59.9.patch
2019-11-05 11:15:54 -03:00

47 lines
2.2 KiB
Diff

diff --git a/node_modules/react-native/react.gradle b/node_modules/react-native/react.gradle
index f10a00b..467f7a5 100644
--- a/node_modules/react-native/react.gradle
+++ b/node_modules/react-native/react.gradle
@@ -58,7 +58,7 @@ afterEvaluate {
// Set up dev mode
def devEnabled = !(config."devDisabledIn${targetName}"
- || targetName.toLowerCase().contains("release"))
+ || targetName.toLowerCase().contains("release") || targetName.toLowerCase().contains("unsigned"))
def extraArgs = extraPackagerArgs;
@@ -78,7 +78,7 @@ afterEvaluate {
enabled config."bundleIn${targetName}" ||
config."bundleIn${variant.buildType.name.capitalize()}" ?:
- targetName.toLowerCase().contains("release")
+ (targetName.toLowerCase().contains("release") || targetName.toLowerCase().contains("unsigned"))
}
// Expose a minimal interface on the application variant and the task itself:
diff --git a/node_modules/react-native/Libraries/Text/Text/RCTTextShadowView.m b/node_modules/react-native/Libraries/Text/Text/RCTTextShadowView.m
index d464e6a..6c397c5 100644
--- a/node_modules/react-native/Libraries/Text/Text/RCTTextShadowView.m
+++ b/node_modules/react-native/Libraries/Text/Text/RCTTextShadowView.m
@@ -170,6 +170,12 @@ - (void)postprocessAttributedText:(NSMutableAttributedString *)attributedText
- (NSAttributedString *)attributedTextWithMeasuredAttachmentsThatFitSize:(CGSize)size
{
+ static UIImage *placeholderImage;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ placeholderImage = [UIImage new];
+ });
+
NSMutableAttributedString *attributedText =
[[NSMutableAttributedString alloc] initWithAttributedString:[self attributedTextWithBaseTextAttributes:nil]];
@@ -188,6 +194,7 @@ - (NSAttributedString *)attributedTextWithMeasuredAttachmentsThatFitSize:(CGSize
maximumSize:size];
NSTextAttachment *attachment = [NSTextAttachment new];
attachment.bounds = (CGRect){CGPointZero, fittingSize};
+ attachment.image = placeholderImage;
[attributedText addAttribute:NSAttachmentAttributeName value:attachment range:range];
}
];