Skip to content

Commit

Permalink
Update MainWindow.BthPS3.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
nefarius committed Sep 15, 2023
1 parent 89ddf54 commit e08a2d0
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions app/MainWindow.BthPS3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private void DetectBthPS3()
{
ResultsPanel.Children.Add(CreateNewTile("Outdated BthPS3 Updater Configuration found",
BthPS3UpdaterOutdatedOnClicked, true));
_actionsToRun.Add(BthPS3UpdaterOutdatedOnClicked);
_actionsToRun.Add(FixBthPS3UpdaterOutdated);
}
}
}
Expand All @@ -79,6 +79,23 @@ private async void BthPS3UpdaterOutdatedOnClicked()
ProgressDialogController controller =
await this.ShowProgressAsync("Please wait...", "Deleting automatic updater");

FixBthPS3UpdaterOutdated();

controller.SetMessage("Showing update notification");

await this.ShowMessageAsync("Download update",
"I will now take you to the latest setup, simply download it and follow the steps to be up to date!");

Process.Start(Constants.BthPS3LatestReleaseUri);

await controller.CloseAsync();

await Refresh();
}

[SuppressMessage("ReSharper", "InconsistentNaming")]
private static void FixBthPS3UpdaterOutdated()
{
try
{
TaskService.Instance.RootFolder.DeleteTask(Constants.BthPS3UpdaterScheduledTaskName, false);
Expand Down Expand Up @@ -110,16 +127,5 @@ private async void BthPS3UpdaterOutdatedOnClicked()
{
Log.Error(ex, "Failed to delete updater INI file");
}

controller.SetMessage("Showing update notification");

await this.ShowMessageAsync("Download update",
"I will now take you to the latest setup, simply download it and follow the steps to be up to date!");

Process.Start(Constants.BthPS3LatestReleaseUri);

await controller.CloseAsync();

await Refresh();
}
}

0 comments on commit e08a2d0

Please sign in to comment.