Skip to content

Commit

Permalink
chore: delete convert task
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-is-cute committed Aug 22, 2024
1 parent e384702 commit f5a55ff
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 323 deletions.
283 changes: 0 additions & 283 deletions ConvertTask.cs

This file was deleted.

33 changes: 0 additions & 33 deletions Ui/Tabs/Manager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ internal class Manager : IDisposable {

private bool _downloadingUpdates;
private bool _checkingForUpdates;
private bool _converting;
private string _filter = string.Empty;
private bool _forced;

Expand Down Expand Up @@ -385,38 +384,6 @@ await InstallerWindow.OpenAndAdd(new InstallerWindow.OpenOptions {
this.Plugin.Penumbra.OpenMod(pkg.ModDirectoryName());
}

if (pkg.FileStorageMethod == FileStorageMethod.Hash) {
using var disabled = ImGuiHelper.DisabledIf(this._converting);
if (ImGuiHelper.CentredWideButton("Convert to original file layout") && !this._converting) {
this._converting = true;
Task.Run(async () => {
try {
var notif = this.Plugin.NotificationManager.AddNotification(new Notification {
Type = NotificationType.Info,
Title = pkg.Name,
Content = "Converting mod to original file layout...",
InitialDuration = TimeSpan.MaxValue,
Minimized = false,
});

try {
await new ConvertTask(pkg, notif).Run();
} catch (Exception ex) {
Plugin.Log.Error(ex, "Failed to convert package");
notif.AddOrUpdate(this.Plugin.NotificationManager, (notif, _) => {
notif.InitialDuration = TimeSpan.FromSeconds(5);
notif.Type = NotificationType.Error;
notif.Content = "An error occured while converting.";
});
}
await this.Plugin.State.UpdatePackages();
} finally {
this._converting = false;
}
});
}
}

if (ImGuiHelper.CentredWideButton("Open on Heliosphere website")) {
var url = $"https://heliosphere.app/mod/{pkg.Id.ToCrockford()}";
Process.Start(new ProcessStartInfo(url) {
Expand Down
7 changes: 0 additions & 7 deletions queries/ConvertTask.graphql

This file was deleted.

0 comments on commit f5a55ff

Please sign in to comment.