Skip to content

Commit

Permalink
chore: apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
rk132 committed Jun 14, 2024
1 parent dbc18cc commit 12f55a1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public AvatarAPIRequests(CancellationToken ctx = default)
authorizedRequest = new AuthorizedRequest();
}

public async Task<List<GetUserAvatarResponse>> GetUserAvatars(string userId)
public async Task<List<UserAvatarResponse>> GetUserAvatars(string userId)
{
var response = await authorizedRequest.SendRequest<Response>(
new RequestData
Expand All @@ -51,7 +51,7 @@ public async Task<List<GetUserAvatarResponse>> GetUserAvatars(string userId)

var json = JObject.Parse(response.Text);
var data = json[DATA]!;
var avatars = data.AsEnumerable().Select(avatarData => new GetUserAvatarResponse()
var avatars = data.AsEnumerable().Select(avatarData => new UserAvatarResponse()
{
BodyType = EnumExtensions.GetValueFromDescription<BodyType>(avatarData[DATA][BODY_TYPE]!.ToString()),
Id = avatarData[ID]!.ToString(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace ReadyPlayerMe.AvatarCreator.Responses
{
public struct GetUserAvatarResponse
public struct UserAvatarResponse
{
public string Id;
public string Partner;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,14 @@ private void SwitchZoomByCategory(AssetType category)
{
return;
}

if (category.IsOutfitAsset())
{
cameraZoom.ToFullbodyView();
return;
}
else
{
cameraZoom.ToFaceView();
}

cameraZoom.ToFaceView();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class AvatarSelection : State
public override StateType StateType => StateType.AvatarSelection;
public override StateType NextState => StateType.Editor;

private List<GetUserAvatarResponse> userAvatars;
private List<UserAvatarResponse> userAvatars;
private Dictionary<string, GameObject> avatarButtonsMap;
private AvatarAPIRequests avatarAPIRequests;

Expand Down

0 comments on commit 12f55a1

Please sign in to comment.