diff --git a/Flow.Launcher/ViewModel/ResultsViewModel.cs b/Flow.Launcher/ViewModel/ResultsViewModel.cs index 61566b415..02fb379fa 100644 --- a/Flow.Launcher/ViewModel/ResultsViewModel.cs +++ b/Flow.Launcher/ViewModel/ResultsViewModel.cs @@ -19,7 +19,7 @@ namespace Flow.Launcher.ViewModel public ResultCollection Results { get; } - private readonly object _collectionLock = new object(); + private readonly object _collectionLock = new(); private readonly Settings _settings; private int MaxResults => _settings?.MaxResultsToShow ?? 6; @@ -89,7 +89,7 @@ namespace Flow.Launcher.ViewModel #region Private Methods - private int InsertIndexOf(int newScore, IList list) + private static int InsertIndexOf(int newScore, IList list) { int index = 0; for (; index < list.Count; index++) @@ -118,7 +118,6 @@ namespace Flow.Launcher.ViewModel } } - #endregion #region Public Methods @@ -190,10 +189,10 @@ namespace Flow.Launcher.ViewModel if (token.IsCancellationRequested) return; - UpdateResults(newResults, token, reselect); + UpdateResults(newResults, reselect, token); } - private void UpdateResults(List newResults, CancellationToken token = default, bool reselect = true) + private void UpdateResults(List newResults, bool reselect = true, CancellationToken token = default) { lock (_collectionLock) {