Page MenuHomePhabricator

[native] Introduce RegistrationMode in EditUserAvatarProvider
ClosedPublic

Authored by ashoat on May 31 2023, 1:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 1:59 PM
Unknown Object (File)
Oct 27 2024, 8:19 AM
Unknown Object (File)
Oct 22 2024, 2:57 PM
Unknown Object (File)
Oct 18 2024, 9:43 PM
Unknown Object (File)
Oct 18 2024, 9:43 PM
Unknown Object (File)
Oct 10 2024, 4:03 PM
Unknown Object (File)
Sep 27 2024, 6:17 AM
Unknown Object (File)
Aug 29 2024, 4:50 AM
Subscribers

Details

Summary

A consumer of the EditUserAvatarContext will be able to call setRegistrationMode to override what happens when an avatar is successfully selected.

This will allow the registration flow to get the avatar info without needing to change much other code.

Test Plan

This was tested in combination with the rest of the stack. I tested:

  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

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

native/avatars/edit-user-avatar-provider.react.js
108 ↗(On Diff #27319)

In D8017, I made setUserAvatar wait until the keyserver call completed before returning. Doing the same thing here since it allows callers to eg. display a loading spinner while the operation is happening. Current callers don't actually await the promise anyways

This revision is now accepted and ready to land.Jun 1 2023, 11:13 AM