Skip to content

Commit

Permalink
chore: undo test comments
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisonHough committed Nov 13, 2023
1 parent 056a09a commit 401906c
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions Samples~/AvatarCreatorSamples/Scripts/ProfileManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class ProfileManager : MonoBehaviour
private const string DIRECTORY_NAME = "Ready Player Me";
private const string FILE_NAME = "User";

//[SerializeField] private ProfileUI profileUI;
[SerializeField] private ProfileUI profileUI;

private string filePath;
private string directoryPath;
Expand Down Expand Up @@ -47,7 +47,7 @@ public bool LoadSession()
var userSession = JsonConvert.DeserializeObject<UserSession>(json);
AuthManager.SetUser(userSession);

//SetProfileData(userSession);
SetProfileData(userSession);

SDKLogger.Log(TAG, $"Loaded session from {filePath}");
return true;
Expand All @@ -58,26 +58,26 @@ public void SaveSession(UserSession userSession)
var json = JsonConvert.SerializeObject(userSession);
DirectoryUtility.ValidateDirectory(directoryPath);
File.WriteAllBytes(filePath, Encoding.UTF8.GetBytes(json));
//SetProfileData(userSession);
SetProfileData(userSession);

SDKLogger.Log(TAG, $"Saved session to {filePath}");
}

// private void SetProfileData(UserSession userSession)
// {
// profileUI.SetProfileData(
// userSession.Name,
// char.ToUpperInvariant(userSession.Name[0]).ToString()
// );
// }
private void SetProfileData(UserSession userSession)
{
profileUI.SetProfileData(
userSession.Name,
char.ToUpperInvariant(userSession.Name[0]).ToString()
);
}

private void DeleteSession()
{
if (File.Exists(filePath))
{
File.Delete(filePath);
}
//profileUI.ClearProfile();
profileUI.ClearProfile();

SDKLogger.Log(TAG, $"Deleted session at {filePath}");
}
Expand Down

0 comments on commit 401906c

Please sign in to comment.