HomePhabricator
Diffusion Comm 3ffc2871ec89

[lib][web][native] Refactor actions in message-actions.js

Description

[lib][web][native] Refactor actions in message-actions.js

Summary:
issue: https://linear.app/comm/issue/ENG-4681/create-action-objects-for-all-actions
We want to start migrating our actions to using useKeyserverCall. We need to create an object for each action that will contain the ActionFunc and a config.
Additionally we agreed to wrap the call to useKeyserverCall into a separate hook for every action. For more info see comments under https://linear.app/comm/issue/ENG-4440/refactor-redux-fields-second-iteration-refactor-actions
For now those hooks are very simple, but in the future they will contain more logic

Test Plan: Tested that all of the refactored actions work. Ran yarn flow-all.

Reviewers: michal, kamil, ginsu

Reviewed By: michal

Subscribers: ashoat, tomek

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

Details

Provenance
inkaAuthored on Sep 20 2023, 2:18 AM
Reviewer
michal
Differential Revision
D9240: [lib][web][native] Refactor actions in message-actions.js
Parents
rCOMM0c123b4904c0: [lib] Create function for extracing keyserver id from object id
Branches
Unknown
Tags
Unknown