Page MenuHomePhabricator

[native] use savedEmojiAvatarSelectorForCurrentUser in EmojiAvatarCreation
ClosedPublic

Authored by ginsu on Apr 12 2023, 12:17 PM.
Tags
None
Referenced Files
F6167968: D7403.id25113.diff
Wed, Apr 23, 1:05 AM
F6165033: D7403.id25120.diff
Tue, Apr 22, 10:34 PM
F6164253: D7403.id.diff
Tue, Apr 22, 9:28 PM
Unknown Object (File)
Mon, Apr 21, 8:53 PM
Unknown Object (File)
Wed, Apr 9, 1:08 AM
Unknown Object (File)
Wed, Apr 9, 12:12 AM
Unknown Object (File)
Tue, Apr 8, 10:14 PM
Unknown Object (File)
Tue, Apr 8, 9:56 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 ↗(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