Page MenuHomePhabricator

[native] use savedEmojiAvatarSelectorForCurrentUser in EmojiAvatarCreation
ClosedPublic

Authored by ginsu on Apr 12 2023, 12:17 PM.
Tags
None
Referenced Files
F2109914: D7403.id25120.diff
Tue, Jun 25, 6:01 PM
F2106807: D7403.id.diff
Tue, Jun 25, 8:51 AM
F2106665: D7403.id25054.diff
Tue, Jun 25, 8:28 AM
Unknown Object (File)
Sat, Jun 22, 5:53 PM
Unknown Object (File)
Sun, Jun 16, 1:55 AM
Unknown Object (File)
Fri, Jun 14, 8:46 AM
Unknown Object (File)
Wed, Jun 12, 6:02 PM
Unknown Object (File)
Sat, Jun 8, 8:27 PM
Subscribers

Details

Summary

Based on feedback I got in D7359, when we "reset" the emoji avatar during the emoji avatar creation flow , we want to reset to the current state in redux which we are considering the source of truth. This is the diff that implements the selector I introduced in the previous diff

Depends on D7402

Test Plan

The reset functionality behaves as expected:

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ashoat added inline comments.
native/profile/emoji-avatar-creation.react.js
17 ↗(On Diff #25054)

See my note about making this selector return a function in D7402

This revision is now accepted and ready to land.Apr 12 2023, 5:56 PM
native/profile/emoji-avatar-creation.react.js
22–27 ↗(On Diff #25071)

We could pass initialization functions to useState to avoid needing to call savedEmojiAvatarFunc() when we don't need to, but it's not a huge deal

42 ↗(On Diff #25071)

We could call savedEmojiAvatarFunc() here to avoid calling it unless we need to

native/profile/emoji-avatar-creation.react.js
25 ↗(On Diff #25113)

Shouldn't this be .color?

native/profile/emoji-avatar-creation.react.js
25 ↗(On Diff #25113)

thanks for catching that