Gravatar-SDK-Android
Gravatar-SDK-Android copied to clipboard
QuickEditor: Refreshing all info when no avatar selected and a new one is uploaded
Closes #380
Description
When a new avatar is uploaded into a Gravatar account with no avatar selected, the backend automatically uses that image as the default avatar.
We need to reflect that in the QE UI. We can hardcode the changes in the code, modifying the uiState as required. However, if the backend behavior changes at some point, all previous versions of the QE will show the wrong status of the Gravatar account.
To mitigate that situation, we will refresh all data from the backend if an image is uploaded and no previous avatar is selected.
What do you think about this approach? Do you think it's worth it to refresh everything or assume the risk and modify the uiState locally, expecting the backend to do the same?
Note: I'll add some unit tests before merging if we decide to go this way.
Testing Steps
- Using an account with no avatar selected
- Upload a new image using the QE
- Verify you see, after reloading, the new image as the selected image.