HomePhabricator
Diffusion Comm c0f4929b9b40

[web] Introduce onMessageSent callbacks

Description

[web] Introduce onMessageSent callbacks

Summary:
Introduce ability to register/unregister callbacks that are executed when user sends a message. This functionality exists in mobile app already.
The feature is required to detect sending message and change chat creation view to chat view automatically after sending message.

The code from input-state-container on web seems to be very similar to the native one (probably it could be copy-pasted at some point in the past).
Maybe it would be a good idea to refactor it so the platforms would share common code related to input state. However I think it is out of the scope of this diff.

Test Plan: Tested the callbacks after introducing chat creation view. It's not used yet.

Reviewers: tomek, atul, abosh

Reviewed By: tomek

Subscribers: ashoat, adrian, abosh

Differential Revision: https://phab.comm.dev/D4463

Details

Provenance
jacekAuthored on Jul 26 2022, 1:10 AM
Reviewer
tomek
Differential Revision
D4463: [web] Introduce onMessageSent callbacks
Parents
rCOMM031fe399d93b: [web] Implement callbacks modifying navigation from `ChatThreadComposer`
Branches
Unknown
Tags
Unknown