HomePhabricator
Diffusion Comm 7927b6a593cb

[lib] Update `CurrentUserInfo` on `updateUserAvatarActionTypes.success`

Tags
None
Referenced Files
F442085: Screen Recording 2023-03-23 at 2.00.54 PM.mov
Mar 24 2023, 11:28 AM
File Not Attached
F442054: bf091a.png
Mar 24 2023, 11:28 AM
File Not Attached
F442053: 19b553.png
Mar 24 2023, 11:28 AM
File Not Attached
F442050: 3edb41.png
Mar 24 2023, 11:28 AM
File Not Attached
Subscribers
None

Description

[lib] Update CurrentUserInfo on updateUserAvatarActionTypes.success

Summary: We want to update CurrentUserInfo in Redux on successful updateUserAvatarActionTypes.success.

Test Plan:

  1. Observe that avatar is set:

3edb41.png (354×1 px, 68 KB)

  1. Send { type: 'remove' } to update_user_avatar and observe that the avatar is unset in Redux:

19b553.png (306×1 px, 52 KB)

  1. Send
const emojiUpdateRequest = {
  type: 'emoji',
  emoji: '👍',
  color: '4b87aa',
};

to update_user_avatar and observe that CurrentUserInfo is updated as expected:

bf091a.png (272×1 px, 49 KB)


Reviewers: ashoat, ginsu

Reviewed By: ashoat

Subscribers: tomek

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

Details

Provenance
atulAuthored on Mar 24 2023, 10:45 AM
Reviewer
ashoat
Differential Revision
D7156: [lib] Update `CurrentUserInfo` on `updateUserAvatarActionTypes.success`
Parents
rCOMM6f269a0c7bd9: [native] render user avatars in chat screen
Branches
Unknown
Tags
Unknown