mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add maximum score to the results for developers.
This commit is contained in:
parent
1c01fa4e46
commit
269e583ea7
2 changed files with 7 additions and 2 deletions
|
|
@ -268,6 +268,11 @@ namespace Flow.Launcher.Plugin
|
|||
/// </summary>
|
||||
public bool AddSelectedCount { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum score. This can be useful when set one result to the top by default. This is the score for the results set to the topmost by users.
|
||||
/// </summary>
|
||||
public const int MaxScore = int.MaxValue;
|
||||
|
||||
/// <summary>
|
||||
/// Info of the preview section of a <see cref="Result"/>
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1471,9 +1471,9 @@ namespace Flow.Launcher.ViewModel
|
|||
{
|
||||
if (_topMostRecord.IsTopMost(result))
|
||||
{
|
||||
result.Score = int.MaxValue;
|
||||
result.Score = Result.MaxScore;
|
||||
}
|
||||
else if (result.Score != int.MaxValue)
|
||||
else if (result.Score != Result.MaxScore)
|
||||
{
|
||||
var priorityScore = metaResults.Metadata.Priority * 150;
|
||||
result.Score += result.AddSelectedCount ?
|
||||
|
|
|
|||
Loading…
Reference in a new issue