Skip to content

Commit

Permalink
Update patch
Browse files Browse the repository at this point in the history
  • Loading branch information
j-piasecki committed Dec 4, 2024
1 parent 75d8755 commit 059a99a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java
index 2921f84..93da34c 100644
index 0c4e435..ab94785 100644
--- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java
+++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java
@@ -579,6 +579,10 @@ public class TextLayoutManager {
@@ -606,6 +606,10 @@ public class TextLayoutManager {
for (int lineIndex = 0; lineIndex < calculatedLineCount; lineIndex++) {
boolean endsWithNewLine =
text.length() > 0 && text.charAt(layout.getLineEnd(lineIndex) - 1) == '\n';
Expand All @@ -14,10 +14,10 @@ index 2921f84..93da34c 100644
endsWithNewLine ? layout.getLineMax(lineIndex) : layout.getLineWidth(lineIndex);
if (lineWidth > calculatedWidth) {
diff --git a/node_modules/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm b/node_modules/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm
index b4a7033..499e12e 100644
index 8b00c5f..1ab0761 100644
--- a/node_modules/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm
+++ b/node_modules/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm
@@ -285,8 +285,33 @@ static NSLineBreakMode RCTNSLineBreakModeFromEllipsizeMode(EllipsizeMode ellipsi
@@ -347,8 +347,33 @@ - (TextMeasurement)_measureTextStorage:(NSTextStorage *)textStorage
NSTextContainer *textContainer = layoutManager.textContainers.firstObject;
[layoutManager ensureLayoutForTextContainer:textContainer];

Expand All @@ -34,7 +34,7 @@ index b4a7033..499e12e 100644
+ NSRange range = [layoutManager characterRangeForGlyphRange:lineGlyphRange
+ actualGlyphRange:nil];
+ NSUInteger lastCharacterIndex = range.location + range.length - 1;
+ BOOL endsWithNewLine =
+ BOOL endsWithNewLine =
+ [textStorage.string characterAtIndex:lastCharacterIndex] == '\n';
+ if (!endsWithNewLine && textStorage.string.length > lastCharacterIndex + 1) {
+ textDidWrap = YES;
Expand Down

0 comments on commit 059a99a

Please sign in to comment.