HomePhabricator
Diffusion Comm f78ae44c3ece

Move registrationMode-related logic from `updateImageUserAvatar` to…

Description

Move registrationMode-related logic from updateImageUserAvatar to nativeUpdateUserImageAvatar

Summary:
Effectively D8343, but for updateImageUserAvatar instead of setUserAvatar.

The registrationMode-related code is native-specific and was pretty interwoven with the logic in setUserAvatar/updateImageUserAvatar.

This diff decouples native-specific from updateImageUserAvatar and moves it to nativeUpdateImageUserAvatar.

As of this diff, updateImageUserAvatar is NOT yet platform-agnostic. We still need to pull out uploadSelectedMedia and want the function to take ImageAvatarDBContent instead of the native-specific NativeMediaSelection. The next diff will address this.


Depends on D8344

Test Plan: Continue to be able to set image avatars on native as expected.

Reviewers: ashoat, ginsu, rohan

Reviewed By: ashoat, rohan

Subscribers: tomek

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