Page MenuHomePhabricator

[native] use savedEmojiAvatarSelectorForCurrentUser in EmojiAvatarCreation
ClosedPublic

Authored by ginsu on Apr 12 2023, 12:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 26, 7:00 AM
Unknown Object (File)
Sun, Sep 22, 1:25 AM
Unknown Object (File)
Fri, Sep 20, 6:07 PM
Unknown Object (File)
Fri, Sep 20, 6:07 PM
Unknown Object (File)
Fri, Sep 20, 6:07 PM
Unknown Object (File)
Fri, Sep 20, 6:07 PM
Unknown Object (File)
Fri, Sep 20, 6:07 PM
Unknown Object (File)
Fri, Sep 20, 6:06 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
No Lint Coverage
Unit
No Test Coverage

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

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

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