Skip to content

Commit

Permalink
fix: textTransform not working on new arch
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunrajput committed Oct 27, 2023
1 parent 118e651 commit 448daf6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public class TextAttributeProps {
public static final short TA_KEY_ACCESSIBILITY_ROLE = 24;
public static final short TA_KEY_LINE_BREAK_STRATEGY = 25;
public static final short TA_KEY_ROLE = 26;
public static final short TA_KEY_TEXT_TRANSFORM = 27;

public static final int UNSET = -1;

Expand Down Expand Up @@ -217,6 +218,9 @@ public static TextAttributeProps fromMapBuffer(MapBuffer props) {
case TA_KEY_ROLE:
result.setRole(Role.values()[entry.getIntValue()]);
break;
case TA_KEY_TEXT_TRANSFORM:
result.setTextTransform(entry.getStringValue());
break;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,7 @@ constexpr static MapBuffer::Key TA_KEY_LAYOUT_DIRECTION = 23;
constexpr static MapBuffer::Key TA_KEY_ACCESSIBILITY_ROLE = 24;
constexpr static MapBuffer::Key TA_KEY_LINE_BREAK_STRATEGY = 25;
constexpr static MapBuffer::Key TA_KEY_ROLE = 26;
constexpr static MapBuffer::Key TA_KEY_TEXT_TRANSFORM = 27;

// constants for ParagraphAttributes serialization
constexpr static MapBuffer::Key PA_KEY_MAX_NUMBER_OF_LINES = 0;
Expand Down Expand Up @@ -1077,6 +1078,11 @@ inline MapBuffer toMapBuffer(const TextAttributes& textAttributes) {
TA_KEY_LINE_BREAK_STRATEGY,
toString(*textAttributes.lineBreakStrategy));
}
if (textAttributes.textTransform.has_value()) {
builder.putString(
TA_KEY_TEXT_TRANSFORM, toString(*textAttributes.textTransform));
}

// Decoration
if (textAttributes.textDecorationColor) {
builder.putInt(
Expand Down

0 comments on commit 448daf6

Please sign in to comment.