|
@@ -1,4 +1,3 @@
|
|
|
-using Avalonia.Controls;
|
|
|
|
|
using Avalonia.Threading;
|
|
using Avalonia.Threading;
|
|
|
using FluentAvalonia.UI.Controls;
|
|
using FluentAvalonia.UI.Controls;
|
|
|
using Gommon;
|
|
using Gommon;
|
|
@@ -51,7 +50,7 @@ namespace Ryujinx.Ava
|
|
|
|
|
|
|
|
private static readonly string[] _windowsDependencyDirs = [];
|
|
private static readonly string[] _windowsDependencyDirs = [];
|
|
|
|
|
|
|
|
- public static async Task BeginUpdateAsync(this Window mainWindow, bool showVersionUpToDate = false)
|
|
|
|
|
|
|
+ public static async Task BeginUpdateAsync(bool showVersionUpToDate = false)
|
|
|
{
|
|
{
|
|
|
if (_running)
|
|
if (_running)
|
|
|
{
|
|
{
|
|
@@ -225,7 +224,7 @@ namespace Ryujinx.Ava
|
|
|
? $"Canary {currentVersion} -> Canary {newVersion}"
|
|
? $"Canary {currentVersion} -> Canary {newVersion}"
|
|
|
: $"{currentVersion} -> {newVersion}";
|
|
: $"{currentVersion} -> {newVersion}";
|
|
|
|
|
|
|
|
- RequestUserToUpdate:
|
|
|
|
|
|
|
+ RequestUserToUpdate:
|
|
|
// Show a message asking the user if they want to update
|
|
// Show a message asking the user if they want to update
|
|
|
UserResult shouldUpdate = await ContentDialogHelper.CreateUpdaterChoiceDialog(
|
|
UserResult shouldUpdate = await ContentDialogHelper.CreateUpdaterChoiceDialog(
|
|
|
LocaleManager.Instance[LocaleKeys.RyujinxUpdater],
|
|
LocaleManager.Instance[LocaleKeys.RyujinxUpdater],
|
|
@@ -235,7 +234,7 @@ namespace Ryujinx.Ava
|
|
|
switch (shouldUpdate)
|
|
switch (shouldUpdate)
|
|
|
{
|
|
{
|
|
|
case UserResult.Yes:
|
|
case UserResult.Yes:
|
|
|
- await UpdateRyujinx(mainWindow, _buildUrl);
|
|
|
|
|
|
|
+ await UpdateRyujinx(_buildUrl);
|
|
|
break;
|
|
break;
|
|
|
// Secondary button maps to no, which in this case is the show changelog button.
|
|
// Secondary button maps to no, which in this case is the show changelog button.
|
|
|
case UserResult.No:
|
|
case UserResult.No:
|
|
@@ -258,7 +257,7 @@ namespace Ryujinx.Ava
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private static async Task UpdateRyujinx(Window parent, string downloadUrl)
|
|
|
|
|
|
|
+ private static async Task UpdateRyujinx(string downloadUrl)
|
|
|
{
|
|
{
|
|
|
_updateSuccessful = false;
|
|
_updateSuccessful = false;
|
|
|
|
|
|
|
@@ -278,7 +277,7 @@ namespace Ryujinx.Ava
|
|
|
SubHeader = LocaleManager.Instance[LocaleKeys.UpdaterDownloading],
|
|
SubHeader = LocaleManager.Instance[LocaleKeys.UpdaterDownloading],
|
|
|
IconSource = new SymbolIconSource { Symbol = Symbol.Download },
|
|
IconSource = new SymbolIconSource { Symbol = Symbol.Download },
|
|
|
ShowProgressBar = true,
|
|
ShowProgressBar = true,
|
|
|
- XamlRoot = parent,
|
|
|
|
|
|
|
+ XamlRoot = App.MainWindow,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
taskDialog.Opened += (s, e) =>
|
|
taskDialog.Opened += (s, e) =>
|