Page MenuHomePhabricator

[native] Preserve the draft for ChatInputBar after leaving edit mode
ClosedPublic

Authored by kuba on Apr 7 2023, 7:22 AM.
Tags
None
Referenced Files
F3169345: D7347.id.diff
Thu, Nov 7, 10:51 AM
Unknown Object (File)
Tue, Nov 5, 2:41 AM
Unknown Object (File)
Tue, Nov 5, 2:41 AM
Unknown Object (File)
Tue, Nov 5, 2:41 AM
Unknown Object (File)
Sep 28 2024, 6:58 AM
Unknown Object (File)
Sep 28 2024, 6:58 AM
Unknown Object (File)
Sep 28 2024, 6:58 AM
Unknown Object (File)
Sep 28 2024, 6:58 AM
Subscribers

Details

Summary

We want to preserve user input after exiting edit mode. If we are in edit mode we don't override the draft. After exiting it we want to restore the previous content. We need a callback, to always have the latest state.

Test Plan

Run the app on iOS. Typed a message in the input bar. Entered edit mode. Changed the content of the message in the input bar. Pressed cross to exit edit mode. The draft was restored correctly.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

This revision is now accepted and ready to land.Apr 11 2023, 4:06 AM

Hide send button, if the draft is empty

Requesting review after the changes. Now if the draft message is empty, the send button will be hidden.

This revision is now accepted and ready to land.Apr 12 2023, 5:17 AM

Add callback when exiting editMode