We want to set the content of the edited message in the ChatInputBar when entering edit mode. We need a callback, to always have the latest state.
Details
Details
Run the app on iOS. Checked if when entering the edit mode the content of the message is copied to the InputBar.
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
native/input/input-state-container.react.js | ||
---|---|---|
1213 ↗ | (On Diff #24795) | I had to add the callback, to have the updated state when editing the ChatInputBar. It is necessary, especially for later diffs, where I store the message draft when entering edit mode. |
native/chat/text-message-tooltip-modal.react.js | ||
---|---|---|
68–73 ↗ | (On Diff #24795) | Shouldn't this be inside React.useCallback? |
This comment was removed by • kuba.
native/chat/text-message-tooltip-modal.react.js | ||
---|---|---|
68–73 ↗ | (On Diff #24795) | I wrapped the whole onPressEdit with React.useCallback in earlier diff. |