Minor code improvements for RCTTextInput

Summary: @public Expose hasUnseenUpdates in ReactShadowNode. Various text input cleanup and fixes.

Differential Revision: D2975870
This commit is contained in:
Ahmed El-Helw
2016-02-29 16:42:21 -08:00
parent df382e986c
commit 75117fc91a
5 changed files with 23 additions and 33 deletions

View File

@@ -239,9 +239,7 @@ import com.facebook.react.uimanager.events.EventDispatcher;
float clipTop,
float clipRight,
float clipBottom) {
// Normally, this would be a node.hasNewLayout() check, but we also need to check if a node
// needs onCollectExtraUpdates() call.
boolean hasUpdates = node.hasUpdates();
boolean hasUpdates = node.hasNewLayout();
boolean expectingUpdate = hasUpdates || node.isUpdated() ||
node.clipBoundsChanged(clipLeft, clipTop, clipRight, clipBottom);
@@ -323,7 +321,7 @@ import com.facebook.react.uimanager.events.EventDispatcher;
nodeRegions);
}
if (hasUpdates) {
if (node.hasUnseenUpdates()) {
node.onCollectExtraUpdates(mOperationsQueue);
node.markUpdateSeen();
}