mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-20 04:05:46 +00:00
UI: Improve "Show Changelog" button in the updater
Now it no longer causes the dialog to disappear (which then promptly re-appears so you can click yes/no to accept/deny the update)
This commit is contained in:
@@ -88,14 +88,10 @@ namespace Ryujinx.Ava.Systems
|
||||
{
|
||||
if (showVersionUpToDate)
|
||||
{
|
||||
UserResult userResult = await ContentDialogHelper.CreateUpdaterUpToDateInfoDialog(
|
||||
await ContentDialogHelper.CreateUpdaterUpToDateInfoDialog(
|
||||
LocaleManager.Instance[LocaleKeys.DialogUpdaterAlreadyOnLatestVersionMessage],
|
||||
string.Empty);
|
||||
|
||||
if (userResult is UserResult.Ok)
|
||||
{
|
||||
OpenHelper.OpenUrl(_versionResponse.ReleaseUrlFormat.Format(currentVersion));
|
||||
}
|
||||
string.Empty,
|
||||
_versionResponse.ReleaseUrlFormat.Format(currentVersion));
|
||||
}
|
||||
|
||||
Logger.Info?.Print(LogClass.Application, "Up to date.");
|
||||
|
||||
@@ -60,14 +60,10 @@ namespace Ryujinx.Ava.Systems
|
||||
{
|
||||
if (showVersionUpToDate)
|
||||
{
|
||||
UserResult userResult = await ContentDialogHelper.CreateUpdaterUpToDateInfoDialog(
|
||||
await ContentDialogHelper.CreateUpdaterUpToDateInfoDialog(
|
||||
LocaleManager.Instance[LocaleKeys.DialogUpdaterAlreadyOnLatestVersionMessage],
|
||||
string.Empty);
|
||||
|
||||
if (userResult is UserResult.Ok)
|
||||
{
|
||||
OpenHelper.OpenUrl(_versionResponse.ReleaseUrlFormat.Format(currentVersion));
|
||||
}
|
||||
string.Empty,
|
||||
changelogUrl: _versionResponse.ReleaseUrlFormat.Format(currentVersion));
|
||||
}
|
||||
|
||||
Logger.Info?.Print(LogClass.Application, "Up to date.");
|
||||
@@ -106,22 +102,18 @@ namespace Ryujinx.Ava.Systems
|
||||
|
||||
Logger.Info?.Print(LogClass.Application, $"Version found: {newVersionString.Replace("→", "->")}");
|
||||
|
||||
RequestUserToUpdate:
|
||||
// Show a message asking the user if they want to update
|
||||
UserResult shouldUpdate = await ContentDialogHelper.CreateUpdaterChoiceDialog(
|
||||
LocaleManager.Instance[LocaleKeys.RyujinxUpdater],
|
||||
LocaleManager.Instance[LocaleKeys.RyujinxUpdaterMessage],
|
||||
newVersionString);
|
||||
newVersionString,
|
||||
ReleaseInformation.GetChangelogUrl(currentVersion, newVersion));
|
||||
|
||||
switch (shouldUpdate)
|
||||
{
|
||||
case UserResult.Yes:
|
||||
await UpdateRyujinx(_versionResponse.ArtifactUrl);
|
||||
break;
|
||||
// Secondary button maps to no, which in this case is the show changelog button.
|
||||
case UserResult.No:
|
||||
OpenHelper.OpenUrl(ReleaseInformation.GetChangelogUrl(currentVersion, newVersion));
|
||||
goto RequestUserToUpdate;
|
||||
default:
|
||||
_running = false;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user