First step in the great avatars refactor/cleanup. Created this diff to factor out all the logic for uploading and preparing an image selection to be saved by the set avatar endpoints, which was really long and making it difficult to read/work in the avatar-hooks file.
Details
Details
- Reviewers
ashoat atul - Commits
- rCOMM9081f2d40dba: [native] introduce useUploadSelectedMedia hook
Tested that I could still upload image avatar through this hook, and that the correct loading states for either user avatar or thread avatars were being changed during the image avatar creation flow
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
native/avatars/avatar-hooks.js | ||
---|---|---|
139 ↗ | (On Diff #25469) | This is a temporary solution until we introduce an edit avatar context/provider. Again I wanted to create this diff first this file a bit easier to read/work in. |
native/avatars/avatar-hooks.js | ||
---|---|---|
320–326 ↗ | (On Diff #25469) | Completely removed this from useUploadSelectedMedia since this will always be false and is unnecessary |