When we are in edit mode we don't want to lose changes by navigating. I display an alert when we are in edit mode and we have some changes in the edited message.
Details
Details
Run the app on iOS, and check if in edit mode with changes when going back to the thread list, the alert is displayed, and if works as expected.
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
native/chat/chat-input-bar.react.js | ||
---|---|---|
892–901 | I had to add the saveExit method to preserve the draft correctly. Without this, it would be overwritten with the edited message. |
native/chat/chat-input-bar.react.js | ||
---|---|---|
190 | Some other name like clearBeforeRemoveListener would be clearer |
native/chat/chat-input-bar.react.js | ||
---|---|---|
1102 ↗ | (On Diff #25253) | Instead of passing it in, would it be possible to useNavigation to get the navigation prop? Not sure it makes sense, just a thought |
native/chat/chat-input-bar.react.js | ||
---|---|---|
1102 ↗ | (On Diff #25253) | Yes, it is possible. I can change it if you want. But I think it isn't necessary, because it is only one "passing". Should I change it? |
native/chat/chat-input-bar.react.js | ||
---|---|---|
1102 ↗ | (On Diff #25253) | Up to you, I don't feel strongly if there's only one instance of "prop drilling" |
native/chat/chat-input-bar.react.js | ||
---|---|---|
1102 ↗ | (On Diff #25253) | In that case, I would leave it like this then. |