Page MenuHomePhabricator

[native] add starting payload to send reaction message dispatch action promise
ClosedPublic

Authored by ginsu on Dec 30 2022, 4:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 1, 10:29 PM
Unknown Object (File)
Sat, Nov 30, 10:07 AM
Unknown Object (File)
Sat, Nov 30, 10:07 AM
Unknown Object (File)
Sat, Nov 30, 10:06 AM
Unknown Object (File)
Sat, Nov 30, 6:57 AM
Unknown Object (File)
Sat, Nov 30, 6:57 AM
Unknown Object (File)
Fri, Nov 29, 7:27 PM
Unknown Object (File)
Nov 26 2024, 5:24 PM
Subscribers

Details

Summary

add starting payload to send reaction message dispatch action promise. This starting payload is the optimistically created reaction message.


Depends on D6121
Linear Task: ENG-2520

Test Plan

flow and ths will be further tested in a subsequent diff

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ginsu requested review of this revision.Dec 30 2022, 4:24 PM
tomek requested changes to this revision.Jan 2 2023, 6:08 AM
tomek added inline comments.
native/chat/reaction-message-utils.js
31–41 ↗(On Diff #20460)

Can we modify the type of viewerID so that null isn't allowed and invariant isn't necessary?

101–118 ↗(On Diff #20460)

Is there a way to share more code between the platforms? In the previous diff we've done something similar for web.

This revision now requires changes to proceed.Jan 2 2023, 6:08 AM
native/chat/reaction-message-utils.js
31–41 ↗(On Diff #20460)

The TooltipEntry onPress type in the master branch has viewerID set to maybe, I think this is something we can do when we work on ENG-2626

101–118 ↗(On Diff #20460)

We can create a helper function for just creating the starting payload, but since native is using dispatchFunctions and bindServerCall and web are using the hook equivalents with useServerCall() and useDispatchActionPromise(), sharing that part of code is going to be tricky

tomek added inline comments.
native/chat/reaction-message-utils.js
101–118 ↗(On Diff #20460)

Ok, makes sense

This revision is now accepted and ready to land.Jan 5 2023, 4:40 AM