HomePhabricator
Diffusion Comm 59eb11c6dda0

[native] Replace savedEmojiAvatarSelector with savedEmojiAvatarFunc

Description

[native] Replace savedEmojiAvatarSelector with savedEmojiAvatarFunc

Summary:
This simple refactor diff moves the useSelector to the parent component, allowing the child component to take any generic function.

This slightly improves performance in the case where selection from Redux state is not needed, which is the case in the new registration flow.

Depends on D8041

Test Plan:
Flow, along with the testing I did for the whole stack:

  1. ENS flow, both when user has an ENS avatar and when they don't
  2. Setting an emoji avatar
  3. Setting an image avatar via camera
  4. Setting an image avatar via media library
  5. Tested avatar update flow after being logged in to make sure I didn't regress anything

Reviewers: atul, ginsu

Reviewed By: atul

Subscribers: tomek

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

Details

Provenance
ashoatAuthored on May 30 2023, 9:45 AM
Reviewer
atul
Differential Revision
D8042: [native] Replace savedEmojiAvatarSelector with savedEmojiAvatarFunc
Parents
rCOMM3c9aefcd99b3: [native] Introduce RegistrationMode in EditUserAvatarProvider
Branches
Unknown
Tags
Unknown