Skip to content

Commit

Permalink
dotnet-format
Browse files Browse the repository at this point in the history
  • Loading branch information
andybak committed Apr 3, 2024
1 parent 8f82aa0 commit 3ed97a0
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Assets/Scripts/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public enum AppState
public static string ICOSA_DEVICECODE_URL = "http://192.168.1.228:3000/device";
// public static string ICOSA_API_BASEPATH = "http://api.icosa.gallery";
public static string ICOSA_API_BASEPATH = "http://192.168.1.228:8000";

public string IcosaToken
{
get => PlayerPrefs.HasKey("IcosaToken") ? PlayerPrefs.GetString("IcosaToken") : null;
Expand Down Expand Up @@ -240,7 +240,7 @@ public static void Log(string msg)
[Header("Identities")]
[SerializeField] private OAuth2Identity m_GoogleIdentity;
[SerializeField] private OAuth2Identity m_SketchfabIdentity;

// ------------------------------------------------------------
// Private data
// ------------------------------------------------------------
Expand Down
12 changes: 6 additions & 6 deletions Assets/Scripts/GUI/ProfilePopUpWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ void RefreshObjects()
m_DriveSyncing = driveSyncing;
RefreshBackupProgressText();
}

private void RefreshIcosaUserInfoUi()
{
m_IcosaNameText.text = App.IcosaUserName;
Expand Down Expand Up @@ -233,7 +233,7 @@ private IEnumerator LoginCoroutine(string code)
}
yield break;
}

if (loginTask.Result?.AccessToken == null)
{
// TODO: Show error message.
Expand Down Expand Up @@ -261,7 +261,7 @@ private IEnumerator FetchUserDataCoroutine(Action<FullUser> onSuccess)
LoginFailure();
}
Debug.Log($"GetUser failed with exception: {getUserTask.Exception}");
yield break;
yield break;
}

var userData = getUserTask.Result;
Expand All @@ -273,7 +273,7 @@ private IEnumerator FetchUserDataCoroutine(Action<FullUser> onSuccess)
}
onSuccess?.Invoke(userData);
}

private void LoginSuccess(FullUser userData)
{
// Call the callback delegate if it's provided (which means this was called from the first coroutine)
Expand All @@ -283,7 +283,7 @@ private void LoginSuccess(FullUser userData)
RefreshIcosaUserInfoUi();
HideIcosaLogin();
}

private void LoginFailure()
{
HideIcosaLogin();
Expand Down Expand Up @@ -373,7 +373,7 @@ public void OnProfilePopUpButtonPressed(ProfilePopUpButton button)
}

App.OpenURL(App.ICOSA_DEVICECODE_URL);
ShowIcosaLogin();
ShowIcosaLogin();
m_Persistent = true;
break;
case SketchControlsScript.GlobalCommands.AccountInfo:
Expand Down
8 changes: 4 additions & 4 deletions Assets/Scripts/Sharing/IcosaService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ class IcosaService
{
// public const string kModelLandingPage = "https://api.icosa.gallery/edit/";
// const string kApiHost = "https://api.icosa.gallery";

public const string kModelLandingPage = "http://192.168.1.228:3000/edit/";
const string kApiHost = "http://192.168.1.228:8000";

/// A paginated response, for use with GetNextPageAsync()
public interface Paginated
{
Expand Down Expand Up @@ -228,13 +228,13 @@ public async Task<CreateResponse> CreateModel(
$"{kApiHost}/assets", App.IcosaUserId, "POST", compress: false);

var moreParams = new List<(string, string)>();

// Not currently used or supported by the backend
if (options != null)
{
moreParams.Add(("options", JsonConvert.SerializeObject(options)));
}

uploader.ProgressObject = progress;
var reply = await uploader.SendNamedDataAsync(
"files", File.OpenRead(zipPath), Path.GetFileName(zipPath), "application/zip",
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Sharing/UploadPopUpWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ void RefreshUploadButton(Cloud backend)
{
ui.name.text = App.IcosaUserName;
ui.photo.material.mainTexture = App.IcosaUserIcon;
}
}
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Sharing/VrAssetService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ private async void VerifyIcosaConnectionAndCheckApiVersionAsync()
private static async Task<IcosaStatus> GetIcosaStatus()
{
// UserConfig override
if (App.UserConfig.Flags.DisableIcosa || App.Instance.IcosaToken==null)
if (App.UserConfig.Flags.DisableIcosa || App.Instance.IcosaToken == null)
{
return IcosaStatus.Disabled;
}
Expand Down
6 changes: 3 additions & 3 deletions Assets/Scripts/Sharing/WebRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@ public static Task<Reply> GetAsync(string uri)

private string m_Uri;
private string m_Method;

private OAuth2Identity m_Identity;
private string m_LoginToken;

private byte[] m_Result = null;
private int m_UploadedBytes = 0;
private float? m_PreUploadProgress = null;
Expand Down Expand Up @@ -304,7 +304,7 @@ public WebRequest(string uri, OAuth2Identity identity,
m_Uri = uri;
m_Identity = identity;
}

// identity may be null, in which case no authentication takes place
public WebRequest(string uri, string loginToken,
string method = UnityWebRequest.kHttpVerbGET, bool compress = false)
Expand Down

0 comments on commit 3ed97a0

Please sign in to comment.