mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Revert "Fix result update issue during modified collection enumeration"
This commit is contained in:
parent
3f413d17ec
commit
00e76f6742
1 changed files with 13 additions and 22 deletions
|
|
@ -1447,35 +1447,26 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
#endif
|
||||
|
||||
try
|
||||
foreach (var metaResults in resultsForUpdates)
|
||||
{
|
||||
foreach (var metaResults in resultsForUpdates)
|
||||
foreach (var result in metaResults.Results)
|
||||
{
|
||||
foreach (var result in metaResults.Results)
|
||||
if (_topMostRecord.IsTopMost(result))
|
||||
{
|
||||
if (_topMostRecord.IsTopMost(result))
|
||||
{
|
||||
result.Score = int.MaxValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
var priorityScore = metaResults.Metadata.Priority * 150;
|
||||
result.Score += _userSelectedRecord.GetSelectedCount(result) + priorityScore;
|
||||
}
|
||||
result.Score = int.MaxValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
var priorityScore = metaResults.Metadata.Priority * 150;
|
||||
result.Score += _userSelectedRecord.GetSelectedCount(result) + priorityScore;
|
||||
}
|
||||
}
|
||||
|
||||
// it should be the same for all results
|
||||
bool reSelect = resultsForUpdates.First().ReSelectFirstResult;
|
||||
|
||||
Results.AddResults(resultsForUpdates, token, reSelect);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Debug("MainViewModel", $"Error in UpdateResultView: {ex.Message}");
|
||||
}
|
||||
|
||||
|
||||
// it should be the same for all results
|
||||
bool reSelect = resultsForUpdates.First().ReSelectFirstResult;
|
||||
|
||||
Results.AddResults(resultsForUpdates, token, reSelect);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
|||
Loading…
Reference in a new issue