Added EditState which stores information about which message is being currently edited.
Details
- Reviewers
michal inka ginsu - Commits
- rCOMM921b8bba564c: [native] Add EditState to the InputState
Run the app, and check if it still works. More tests are in later diffs.
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Can you provide more justification as to why this state needs to exist globally versus just being inside a local React component?
EDIT
This is more clear in D7343... the state needs to be set from a tooltip, which means we need some React context to hold the state. We could use a "one-off" context for this, but I think it's fine to use InputStateContainer.
native/input/input-state.js | ||
---|---|---|
57 ↗ | (On Diff #24781) | Couldn't this be just +editedMessageID: ?string, ? Do you plan to add more fields to EditState? |
native/input/input-state.js | ||
---|---|---|
57 ↗ | (On Diff #24781) | For now, I don't plan to add new fields. But in the future, we might need more states for handling media message editing or error handling (when editing the message was unsuccessful). |
native/input/input-state.js | ||
---|---|---|
57 ↗ | (On Diff #24781) | Right, that makes sense. We can probably leave it |