update GitHub issue url constant variable and method names

This commit is contained in:
Jeremy Wu 2023-05-03 07:02:30 +10:00
parent 0b4d68505a
commit 75dfb62671
2 changed files with 5 additions and 5 deletions

View file

@ -19,7 +19,7 @@ namespace Flow.Launcher.Infrastructure
public static readonly string RootDirectory = Directory.GetParent(ApplicationDirectory).ToString();
public static readonly string PreinstalledDirectory = Path.Combine(ProgramDirectory, Plugins);
public const string Issue = "https://github.com/Flow-Launcher/Flow.Launcher/issues";
public const string IssuesUrl = "https://github.com/Flow-Launcher/Flow.Launcher/issues";
public static readonly string Version = FileVersionInfo.GetVersionInfo(Assembly.Location.NonNull()).ProductVersion;
public static readonly string Dev = "Dev";
public const string Documentation = "https://flowlauncher.com/docs/#/usage-tips";

View file

@ -23,7 +23,7 @@ namespace Flow.Launcher
SetException(exception);
}
private static string GetIssueUrl(string website)
private static string GetIssuesUrl(string website)
{
if (!website.StartsWith("https://github.com"))
{
@ -31,7 +31,7 @@ namespace Flow.Launcher
}
if(website.Contains("Flow-Launcher/Flow.Launcher"))
{
return Constant.Issue;
return Constant.IssuesUrl;
}
var treeIndex = website.IndexOf("tree", StringComparison.Ordinal);
return treeIndex == -1 ? $"{website}/issues" : $"{website[..treeIndex]}/issues";
@ -45,8 +45,8 @@ namespace Flow.Launcher
var websiteUrl = exception switch
{
FlowPluginException pluginException =>GetIssueUrl(pluginException.Metadata.Website),
_ => Constant.Issue
FlowPluginException pluginException =>GetIssuesUrl(pluginException.Metadata.Website),
_ => Constant.IssuesUrl
};