mirror of
https://github.com/status-im/react-native.git
synced 2025-02-26 16:10:58 +00:00
Bikeshedding in ReactTextInputShadowNode, part 2
Reviewed By: AaaChiuuu Differential Revision: D5712962 fbshipit-source-id: b0cb5dbbd93b661252e5ddcf6c0a34e59cb7f2c6
This commit is contained in:
parent
5f1f0b14f0
commit
d2f3a7282b
@ -43,7 +43,7 @@ public class ReactTextInputShadowNode extends ReactTextShadowNode implements
|
|||||||
YogaMeasureFunction {
|
YogaMeasureFunction {
|
||||||
|
|
||||||
private @Nullable EditText mEditText;
|
private @Nullable EditText mEditText;
|
||||||
private int mJsEventCount = UNSET;
|
private int mMostRecentEventCount = UNSET;
|
||||||
|
|
||||||
public ReactTextInputShadowNode() {
|
public ReactTextInputShadowNode() {
|
||||||
mTextBreakStrategy = (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) ?
|
mTextBreakStrategy = (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) ?
|
||||||
@ -111,7 +111,7 @@ public class ReactTextInputShadowNode extends ReactTextShadowNode implements
|
|||||||
|
|
||||||
@ReactProp(name = "mostRecentEventCount")
|
@ReactProp(name = "mostRecentEventCount")
|
||||||
public void setMostRecentEventCount(int mostRecentEventCount) {
|
public void setMostRecentEventCount(int mostRecentEventCount) {
|
||||||
mJsEventCount = mostRecentEventCount;
|
mMostRecentEventCount = mostRecentEventCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -135,12 +135,12 @@ public class ReactTextInputShadowNode extends ReactTextShadowNode implements
|
|||||||
public void onCollectExtraUpdates(UIViewOperationQueue uiViewOperationQueue) {
|
public void onCollectExtraUpdates(UIViewOperationQueue uiViewOperationQueue) {
|
||||||
super.onCollectExtraUpdates(uiViewOperationQueue);
|
super.onCollectExtraUpdates(uiViewOperationQueue);
|
||||||
|
|
||||||
if (mJsEventCount != UNSET) {
|
if (mMostRecentEventCount != UNSET) {
|
||||||
Spannable preparedSpannableText = spannedFromShadowNode(this);
|
Spannable preparedSpannableText = spannedFromShadowNode(this);
|
||||||
ReactTextUpdate reactTextUpdate =
|
ReactTextUpdate reactTextUpdate =
|
||||||
new ReactTextUpdate(
|
new ReactTextUpdate(
|
||||||
preparedSpannableText,
|
preparedSpannableText,
|
||||||
mJsEventCount,
|
mMostRecentEventCount,
|
||||||
mContainsImages,
|
mContainsImages,
|
||||||
getPadding(Spacing.LEFT),
|
getPadding(Spacing.LEFT),
|
||||||
getPadding(Spacing.TOP),
|
getPadding(Spacing.TOP),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user