Add another check to avoid some corner case

This commit is contained in:
弘韬 张 2021-01-21 18:38:02 +08:00
parent 8311b39ddc
commit 5389763f58

View file

@ -247,6 +247,7 @@ namespace Flow.Launcher.ViewModel
public event NotifyCollectionChangedEventHandler CollectionChanged;
protected void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
{
CollectionChanged?.Invoke(this, e);
@ -277,7 +278,7 @@ namespace Flow.Launcher.ViewModel
public void RemoveAll(int Capacity = 512)
{
Clear();
if (this.Capacity > 8000)
if (this.Capacity > 8000 && Capacity < this.Capacity)
{
this.Capacity = Capacity;