From c3d5d4c0cecddc41a5fcdf7b18c1ccd7de87df84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=98=E9=9F=AC=20=E5=BC=A0?= Date: Fri, 4 Dec 2020 22:24:25 +0800 Subject: [PATCH] Don't update collection when both newItems and collection is empty --- Flow.Launcher/ViewModel/ResultsViewModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/ViewModel/ResultsViewModel.cs b/Flow.Launcher/ViewModel/ResultsViewModel.cs index f12ea23e9..fc77327cc 100644 --- a/Flow.Launcher/ViewModel/ResultsViewModel.cs +++ b/Flow.Launcher/ViewModel/ResultsViewModel.cs @@ -333,7 +333,7 @@ namespace Flow.Launcher.ViewModel public void Update(List newItems, CancellationToken token = default) { _token = token; - if (_token.IsCancellationRequested) + if (Count == 0 && newItems.Count == 0 || _token.IsCancellationRequested) return; if (editTime < 5 || newItems.Count < 30)