Skip to content

Commit

Permalink
fix(Android): get constants from IntConstants
Browse files Browse the repository at this point in the history
  • Loading branch information
siddarthkay committed Sep 17, 2024
1 parent 21811c0 commit d510996
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.views.text.ReactFontManager;
import com.facebook.react.views.text.ReactTextShadowNode;
import com.facebook.react.common.IntConstants;
import java.util.ArrayList;
import java.util.List;

Expand Down Expand Up @@ -96,12 +97,12 @@ public static Typeface applyStyles(

int want = 0;
if ((weight == Typeface.BOLD)
|| ((oldStyle & Typeface.BOLD) != 0 && weight == ReactTextShadowNode.UNSET)) {
|| ((oldStyle & Typeface.BOLD) != 0 && weight == IntConstants.UNSET)) {
want |= Typeface.BOLD;
}

if ((style == Typeface.ITALIC)
|| ((oldStyle & Typeface.ITALIC) != 0 && style == ReactTextShadowNode.UNSET)) {
|| ((oldStyle & Typeface.ITALIC) != 0 && style == IntConstants.UNSET)) {
want |= Typeface.ITALIC;
}

Expand Down

0 comments on commit d510996

Please sign in to comment.