Clean up some grossness in ScrollResponder

Summary: Still gross but less gross.

Reviewed By: sebmarkbage

Differential Revision: D7107180

fbshipit-source-id: 31f1639a8f44e4ab247c338001a4a5c9b4b83cdf
This commit is contained in:
Sophie Alpert
2018-04-16 13:03:50 -07:00
committed by Facebook Github Bot
parent 8102e35271
commit a275eac56e
3 changed files with 54 additions and 34 deletions

View File

@@ -16,6 +16,8 @@
const Platform = require('Platform');
const UIManager = require('UIManager');
const inputs = new Set();
const TextInputState = {
/**
* Internal state
@@ -68,7 +70,19 @@ const TextInputState = {
);
}
}
}
},
registerInput: function(textFieldID: number) {
inputs.add(textFieldID);
},
unregisterInput: function(textFieldID: number) {
inputs.delete(textFieldID);
},
isTextInput: function(textFieldID: number) {
return inputs.has(textFieldID);
},
};
module.exports = TextInputState;