From 1ddfabc059f0f3fe8dc477d79251917aedc16783 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sun, 30 Mar 2025 12:39:18 +0800 Subject: [PATCH] Update code comments --- Flow.Launcher/ViewModel/MainViewModel.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 0f8e0c94e..041f3a2cd 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -649,10 +649,11 @@ namespace Flow.Launcher.ViewModel if (QueryText != queryText) { - // re-query is done in QueryText's setter method + // Change query text first QueryText = queryText; // When we are changing query from codes, we should not delay the query await QueryAsync(false, isReQuery: false); + // set to false so the subsequent set true triggers // PropertyChanged and MoveQueryTextToEnd is called QueryTextCursorMovedToEnd = false; @@ -730,7 +731,8 @@ namespace Flow.Launcher.ViewModel // so we need manually call Query() // http://stackoverflow.com/posts/25895769/revisions QueryText = string.Empty; - // When we are changing query from selected results, we should not delay the query + // When we are changing query because selected results are changed to history or context menu, + // we should not delay the query Query(false); if (HistorySelected())