Don't update collection when both newItems and collection is empty

This commit is contained in:
弘韬 张 2020-12-04 22:24:25 +08:00
parent 6267fa9a50
commit c3d5d4c0ce

View file

@ -333,7 +333,7 @@ namespace Flow.Launcher.ViewModel
public void Update(List<ResultViewModel> newItems, CancellationToken token = default)
{
_token = token;
if (_token.IsCancellationRequested)
if (Count == 0 && newItems.Count == 0 || _token.IsCancellationRequested)
return;
if (editTime < 5 || newItems.Count < 30)