mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-23 06:09:59 -06:00
forgot some things & remove redundant method on github release channel
This commit is contained in:
@ -17,8 +17,6 @@ namespace Ryujinx.Ava.Systems
|
|||||||
internal static partial class Updater
|
internal static partial class Updater
|
||||||
{
|
{
|
||||||
private static GitHubReleaseChannels.Channel? _currentGitHubReleaseChannel;
|
private static GitHubReleaseChannels.Channel? _currentGitHubReleaseChannel;
|
||||||
|
|
||||||
private const string GitHubApiUrl = "https://api.github.com";
|
|
||||||
|
|
||||||
public static async Task<Optional<(Version Current, Version Incoming)>> CheckGitHubVersionAsync(bool showVersionUpToDate = false)
|
public static async Task<Optional<(Version Current, Version Incoming)>> CheckGitHubVersionAsync(bool showVersionUpToDate = false)
|
||||||
{
|
{
|
||||||
@ -74,7 +72,7 @@ namespace Ryujinx.Ava.Systems
|
|||||||
|
|
||||||
if (userResult is UserResult.Ok)
|
if (userResult is UserResult.Ok)
|
||||||
{
|
{
|
||||||
OpenHelper.OpenUrl(_currentGitHubReleaseChannel.Value.GetSpecificReleaseUrl(currentVersion));
|
OpenHelper.OpenUrl(_currentGitHubReleaseChannel.Value.UrlFormat.Format(currentVersion));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +98,7 @@ namespace Ryujinx.Ava.Systems
|
|||||||
|
|
||||||
if (userResult is UserResult.Ok)
|
if (userResult is UserResult.Ok)
|
||||||
{
|
{
|
||||||
OpenHelper.OpenUrl(_currentGitHubReleaseChannel.Value.GetSpecificReleaseUrl(currentVersion));
|
OpenHelper.OpenUrl(_currentGitHubReleaseChannel.Value.UrlFormat.Format(currentVersion));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,14 +167,12 @@ namespace Ryujinx.Ava.Systems
|
|||||||
public readonly string Owner;
|
public readonly string Owner;
|
||||||
public readonly string Repo;
|
public readonly string Repo;
|
||||||
|
|
||||||
public string UrlFormat => $"https://github.com/{ToString()}/releases/{0}";
|
public string UrlFormat => $"https://github.com/{ToString()}/releases/{{0}}";
|
||||||
|
|
||||||
public override string ToString() => $"{Owner}/{Repo}";
|
public override string ToString() => $"{Owner}/{Repo}";
|
||||||
|
|
||||||
public string GetLatestReleaseApiUrl() =>
|
public string GetLatestReleaseApiUrl() =>
|
||||||
$"https://api.github.com/repos/{ToString()}/releases/latest";
|
$"https://api.github.com/repos/{ToString()}/releases/latest";
|
||||||
|
|
||||||
public string GetSpecificReleaseUrl(Version version) => $"https://github.com/{ToString()}/releases/{version}";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ namespace Ryujinx.Ava.Systems
|
|||||||
|
|
||||||
if (userResult is UserResult.Ok)
|
if (userResult is UserResult.Ok)
|
||||||
{
|
{
|
||||||
OpenHelper.OpenUrl(_currentGitHubReleaseChannel.Value.GetSpecificReleaseUrl(currentVersion));
|
OpenHelper.OpenUrl(_currentGitLabReleaseChannel.UrlFormat.Format(currentVersion));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user