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
Unknown Object (File)
Wed, Dec 11, 12:06 AM
Unknown Object (File)
Sun, Dec 8, 6:34 PM
Unknown Object (File)
Sat, Dec 7, 8:38 PM
Unknown Object (File)
Sat, Dec 7, 8:38 PM
Unknown Object (File)
Sat, Dec 7, 8:38 PM
Unknown Object (File)
Nov 18 2024, 7:23 AM
Unknown Object (File)
Nov 18 2024, 7:14 AM
Unknown Object (File)
Nov 9 2024, 4:34 PM
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