mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-28 00:16:23 +02:00
forgot some things & remove redundant method on github release channel
This commit is contained in:
parent
0df51e24dd
commit
72935bdbb6
2 changed files with 4 additions and 8 deletions
|
@ -17,8 +17,6 @@ namespace Ryujinx.Ava.Systems
|
|||
internal static partial class Updater
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
@ -74,7 +72,7 @@ namespace Ryujinx.Ava.Systems
|
|||
|
||||
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)
|
||||
{
|
||||
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 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 string GetLatestReleaseApiUrl() =>
|
||||
$"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)
|
||||
{
|
||||
OpenHelper.OpenUrl(_currentGitHubReleaseChannel.Value.GetSpecificReleaseUrl(currentVersion));
|
||||
OpenHelper.OpenUrl(_currentGitLabReleaseChannel.UrlFormat.Format(currentVersion));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue