Skip to content

Commit 5389763

Browse files
committed
Add another check to avoid some corner case
1 parent 8311b39 commit 5389763

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Flow.Launcher/ViewModel/ResultsViewModel.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ public class ResultCollection : List<ResultViewModel>, INotifyCollectionChanged
247247

248248
public event NotifyCollectionChangedEventHandler CollectionChanged;
249249

250+
250251
protected void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
251252
{
252253
CollectionChanged?.Invoke(this, e);
@@ -277,7 +278,7 @@ private void AddAll(List<ResultViewModel> Items)
277278
public void RemoveAll(int Capacity = 512)
278279
{
279280
Clear();
280-
if (this.Capacity > 8000)
281+
if (this.Capacity > 8000 && Capacity < this.Capacity)
281282
{
282283
this.Capacity = Capacity;
283284

0 commit comments

Comments
 (0)