mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add support for removing selected count from score
This commit is contained in:
parent
b5e401f759
commit
4ad967b5f3
2 changed files with 8 additions and 1 deletions
|
|
@ -263,6 +263,11 @@ namespace Flow.Launcher.Plugin
|
|||
/// </summary>
|
||||
public PreviewInfo Preview { get; set; } = PreviewInfo.Default;
|
||||
|
||||
/// <summary>
|
||||
/// Determines if the selected count should be added to the score
|
||||
/// </summary>
|
||||
public bool AddSelectedCount { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Info of the preview section of a <see cref="Result"/>
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1476,7 +1476,9 @@ namespace Flow.Launcher.ViewModel
|
|||
else if (result.Score != int.MaxValue)
|
||||
{
|
||||
var priorityScore = metaResults.Metadata.Priority * 150;
|
||||
result.Score += _userSelectedRecord.GetSelectedCount(result) + priorityScore;
|
||||
result.Score += result.AddSelectedCount ?
|
||||
_userSelectedRecord.GetSelectedCount(result) + priorityScore :
|
||||
priorityScore;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue