mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
Fix for PWAs and command prompt not showing up as the first result (#4020)
* Added code which increments the score for the app without any arguments * Removed magic number and added var
This commit is contained in:
@@ -30,6 +30,7 @@ namespace Microsoft.Plugin.Program.Programs
|
||||
public string Description { get; set; }
|
||||
public bool Valid { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
public bool hasArguments { get; set; } = false;
|
||||
public string Location => ParentDirectory;
|
||||
|
||||
private const string ShortcutExtension = "lnk";
|
||||
@@ -54,6 +55,12 @@ namespace Microsoft.Plugin.Program.Programs
|
||||
return null;
|
||||
}
|
||||
|
||||
if(!hasArguments)
|
||||
{
|
||||
var noArgumentScoreModifier = 5;
|
||||
score += noArgumentScoreModifier;
|
||||
}
|
||||
|
||||
var result = new Result
|
||||
{
|
||||
SubTitle = "Win32 application",
|
||||
@@ -191,6 +198,7 @@ namespace Microsoft.Plugin.Program.Programs
|
||||
program.LnkResolvedPath = program.FullPath;
|
||||
program.FullPath = Path.GetFullPath(target).ToLower();
|
||||
program.ExecutableName = Path.GetFileName(target);
|
||||
program.hasArguments = _helper.hasArguments;
|
||||
|
||||
var description = _helper.description;
|
||||
if (!string.IsNullOrEmpty(description))
|
||||
|
||||
Reference in New Issue
Block a user