mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Bypass SearchPrecisionScore and related tests
This commit is contained in:
parent
68811fa324
commit
d0467c6f14
2 changed files with 13 additions and 12 deletions
|
|
@ -65,8 +65,8 @@ namespace Flow.Launcher.Plugin.SharedModels
|
|||
|
||||
public enum SearchPrecisionScore
|
||||
{
|
||||
Regular = 0,
|
||||
Low = 0,
|
||||
Regular = 50,
|
||||
Low = 20,
|
||||
None = 0
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,16 +83,16 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
else matchResult = nameMatch;
|
||||
}
|
||||
|
||||
if (!matchResult.IsSearchPrecisionScoreMet())
|
||||
{
|
||||
if (ExecutableName != null) // only lnk program will need this one
|
||||
matchResult = StringMatcher.FuzzySearch(query, ExecutableName);
|
||||
|
||||
if (!matchResult.IsSearchPrecisionScoreMet())
|
||||
return null;
|
||||
|
||||
matchResult.MatchData = new List<int>();
|
||||
}
|
||||
// if (!matchResult.IsSearchPrecisionScoreMet())
|
||||
// {
|
||||
// if (ExecutableName != null) // only lnk program will need this one
|
||||
// matchResult = StringMatcher.FuzzySearch(query, ExecutableName);
|
||||
//
|
||||
// if (!matchResult.IsSearchPrecisionScoreMet())
|
||||
// return null;
|
||||
//
|
||||
// matchResult.MatchData = new List<int>();
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
|
@ -104,6 +104,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
|
||||
var oldScore = matchResult.RawScore;
|
||||
matchResult.RawScore = Math.Max(newScore, oldScore);
|
||||
matchResult.RawScore *= 10; // Bypass the SearchPrecisionScore and related tests
|
||||
matchResult.MatchData = new List<int>();
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue