mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Introduce RawScore property
New property RawScore is used to save the calculated score without any search precision filtering added.
This commit is contained in:
parent
49c5c5bbde
commit
e60797cd0f
1 changed files with 14 additions and 8 deletions
|
|
@ -96,7 +96,7 @@ namespace Wox.Infrastructure
|
||||||
{
|
{
|
||||||
Success = true,
|
Success = true,
|
||||||
MatchData = indexList,
|
MatchData = indexList,
|
||||||
Score = Math.Max(score, pinyinScore)
|
RawScore = Math.Max(score, pinyinScore)
|
||||||
};
|
};
|
||||||
|
|
||||||
return result.Score > 0 ?
|
return result.Score > 0 ?
|
||||||
|
|
@ -171,16 +171,22 @@ namespace Wox.Infrastructure
|
||||||
{
|
{
|
||||||
public bool Success { get; set; }
|
public bool Success { get; set; }
|
||||||
|
|
||||||
private int _score;
|
/// <summary>
|
||||||
public int Score
|
/// The final score of the match result with all search precision filters applied.
|
||||||
|
/// </summary>
|
||||||
|
public int Score { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The raw calculated search score without any search precision filtering applied.
|
||||||
|
/// </summary>
|
||||||
|
private int _rawScore;
|
||||||
|
public int RawScore
|
||||||
{
|
{
|
||||||
get
|
get { return _rawScore; }
|
||||||
{
|
|
||||||
return _score;
|
|
||||||
}
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_score = ApplySearchPrecisionFilter(value);
|
_rawScore = value;
|
||||||
|
Score = ApplySearchPrecisionFilter(_rawScore);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue