From dec1e77b0ce7dd31aab99661b7505d3cf8bf2a7c Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Mon, 31 Mar 2025 13:04:41 +0800 Subject: [PATCH] Improve code comments --- Flow.Launcher/SearchDelaySpeedWindow.xaml.cs | 2 +- Flow.Launcher/ViewModel/MainViewModel.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Flow.Launcher/SearchDelaySpeedWindow.xaml.cs b/Flow.Launcher/SearchDelaySpeedWindow.xaml.cs index 5889a1280..cfbde8be2 100644 --- a/Flow.Launcher/SearchDelaySpeedWindow.xaml.cs +++ b/Flow.Launcher/SearchDelaySpeedWindow.xaml.cs @@ -28,7 +28,7 @@ public partial class SearchDelaySpeedWindow : Window selected = searchDelaySpeeds.FirstOrDefault(x => x.Value == _pluginViewModel.PluginSearchDelay); } // Add default value to the beginning of the list - // This value should be null + // When _pluginViewModel.PluginSearchDelay equals null, we will select this searchDelaySpeeds.Insert(0, new SearchDelaySpeedData { Display = App.API.GetTranslation(PluginViewModel.DefaultLocalizationKey), LocalizationKey = PluginViewModel.DefaultLocalizationKey }); selected ??= searchDelaySpeeds.FirstOrDefault(); tbDelay.ItemsSource = searchDelaySpeeds; diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 309cd67bb..f43931192 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -298,7 +298,7 @@ namespace Flow.Launcher.ViewModel { if (QueryResultsSelected()) { - // When we are requiring, we should not delay the query + // When we are re-querying, we should not delay the query _ = QueryResultsAsync(false, isReQuery: true); } } @@ -306,7 +306,7 @@ namespace Flow.Launcher.ViewModel public void ReQuery(bool reselect) { BackToQueryResults(); - // When we are requiring, we should not delay the query + // When we are re-querying, we should not delay the query _ = QueryResultsAsync(false, isReQuery: true, reSelect: reselect); } @@ -660,7 +660,7 @@ namespace Flow.Launcher.ViewModel } else if (isReQuery) { - // When we are requiring, we should not delay the query + // When we are re-querying, we should not delay the query await QueryAsync(false, isReQuery: true); }