AndroidTextInput: keep track of mostRecentEventCount in C++ State

Summary:
Keep track of AndroidTextInput's mostRecentEventCount in C++ State.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D18672368

fbshipit-source-id: ea7a635629050a6d4957cbcef6ec0bda5faaad9a
This commit is contained in:
Joshua Gross
2019-11-27 12:55:47 -08:00
committed by Facebook Github Bot
parent 309de462bd
commit da5ea0215a
5 changed files with 31 additions and 7 deletions
@@ -16,6 +16,7 @@ namespace react {
#ifdef ANDROID
folly::dynamic AndroidTextInputState::getDynamic() const {
folly::dynamic newState = folly::dynamic::object();
newState["mostRecentEventCount"] = mostRecentEventCount;
newState["attributedString"] = toDynamic(attributedString);
newState["paragraphAttributes"] = toDynamic(paragraphAttributes);
newState["hash"] = newState["attributedString"]["hash"];