Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
VolcanicArts committed Feb 12, 2025
2 parents 664858a + 2004871 commit c80ea93
Show file tree
Hide file tree
Showing 134 changed files with 3,560 additions and 3,790 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ obj/
/build
/releases
/publish
/publish.sh
/packages/
riderModule.iml
/_ReSharper.Caches/
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS

Copyright (C) 2022-2024 VolcanicArts
Copyright (C) 2022-2025 VolcanicArts

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -633,4 +633,4 @@ copy of the Program in return for a fee.
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
32 changes: 32 additions & 0 deletions VRCOSC.App/Actions/CallbackProgressAction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright (c) VolcanicArts. Licensed under the GPL-3.0 License.
// See the LICENSE file in the repository root for full license text.

using System;
using System.Threading.Tasks;

namespace VRCOSC.App.Actions;

public class CallbackProgressAction : ProgressAction
{
public override string Title { get; }
private readonly Action? callback;
private readonly Func<Task?>? taskCallback;

public CallbackProgressAction(string title, Action callback)
{
Title = title;
this.callback = callback;
}

public CallbackProgressAction(string title, Func<Task?> callback)
{
Title = title;
taskCallback = callback;
}

protected override async Task Perform()
{
callback?.Invoke();
await (taskCallback?.Invoke() ?? Task.CompletedTask);
}
}
37 changes: 0 additions & 37 deletions VRCOSC.App/Actions/CompositeProgressAction.cs

This file was deleted.

25 changes: 0 additions & 25 deletions VRCOSC.App/Actions/DynamicChildProgressAction.cs

This file was deleted.

43 changes: 0 additions & 43 deletions VRCOSC.App/Actions/DynamicProgressAction.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@
using System.Threading.Tasks;
using VRCOSC.App.Utils;

namespace VRCOSC.App.Actions.Files;
namespace VRCOSC.App.Actions;

public class FileDownloadAction : ProgressAction
{
private readonly Storage targetStorage;
private readonly Uri url;
private readonly string assetName;

private float localProgress;

public override string Title => $"Downloading {assetName}";
public override bool UseProgressBar => true;

public FileDownloadAction(Uri url, Storage targetStorage, string assetName)
{
Expand All @@ -26,14 +25,8 @@ public FileDownloadAction(Uri url, Storage targetStorage, string assetName)

protected override async Task Perform()
{
localProgress = 0f;

var fileDownload = new FileDownload();
fileDownload.ProgressChanged += p => localProgress = p;
fileDownload.ProgressChanged += p => OnProgressChanged?.Invoke(p);
await fileDownload.DownloadFileAsync(url, targetStorage.GetFullPath(assetName, true));

localProgress = 1f;
}

public override float GetProgress() => localProgress;
}
95 changes: 0 additions & 95 deletions VRCOSC.App/Actions/Packages/PackageInstallAction.cs

This file was deleted.

50 changes: 0 additions & 50 deletions VRCOSC.App/Actions/Packages/PackageRefreshAction.cs

This file was deleted.

34 changes: 0 additions & 34 deletions VRCOSC.App/Actions/Packages/PackageUninstallAction.cs

This file was deleted.

Loading

0 comments on commit c80ea93

Please sign in to comment.