Skip to content

Commit 3e20c51

Browse files
committed
Code quality
1 parent 2f1e009 commit 3e20c51

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Flow.Launcher/ViewModel/ResultsViewModel.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class ResultsViewModel : BaseModel
1919

2020
public ResultCollection Results { get; }
2121

22-
private readonly object _collectionLock = new object();
22+
private readonly object _collectionLock = new();
2323
private readonly Settings _settings;
2424
private int MaxResults => _settings?.MaxResultsToShow ?? 6;
2525

@@ -89,7 +89,7 @@ public double ItemHeightSize
8989

9090
#region Private Methods
9191

92-
private int InsertIndexOf(int newScore, IList<ResultViewModel> list)
92+
private static int InsertIndexOf(int newScore, IList<ResultViewModel> list)
9393
{
9494
int index = 0;
9595
for (; index < list.Count; index++)
@@ -118,7 +118,6 @@ private int NewIndex(int i)
118118
}
119119
}
120120

121-
122121
#endregion
123122

124123
#region Public Methods
@@ -190,10 +189,10 @@ public void AddResults(ICollection<ResultsForUpdate> resultsForUpdates, Cancella
190189
if (token.IsCancellationRequested)
191190
return;
192191

193-
UpdateResults(newResults, token, reselect);
192+
UpdateResults(newResults, reselect, token);
194193
}
195194

196-
private void UpdateResults(List<ResultViewModel> newResults, CancellationToken token = default, bool reselect = true)
195+
private void UpdateResults(List<ResultViewModel> newResults, bool reselect = true, CancellationToken token = default)
197196
{
198197
lock (_collectionLock)
199198
{

0 commit comments

Comments
 (0)