Small CAC refactoring in prep for CAC 2.0 and wizardless flow #151
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TICKETID
Description
1. Added an extra return property to the CreateAvatar(AvatarProperties avatarProperties) method (made it return a tuple same as CreateAvatarFromTemplate.
Reasoning: To create an avatar from a photo with gender prediction enabled we need to also have the avatar properties, in particular we can get the gender of the predicted avatar which is required to load/update the avatar.
2. Removed gender from AvatarManager constructor
Reasoning: this makes AvatarManager easier to work with as you don't need to create a new one each time you change genders. Also CreateAvatar() function is passed avartarProperties (which can optionally have gender predefined) and CreateAvatarFromTemplate gets the gender from Template data. The only thing that may be useful in future is to add a separate "SetGender" function but at the moment I don't really see a use for it.
3. Removed partner parameter from CreateAvatarFromTemplate() function.
Reasoning: Why would anybody ever want to pass a "partner" value that is not the same as in their CoreSettings ? Doing so would probably break API's anyways (due to non matching subdomain and API key
How to Test
Checklist