From cc2df8d680bb0d2861732e527442e91110027e64 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Tue, 12 Aug 2025 17:31:26 +0800 Subject: [PATCH] Improve code quality --- Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs index 1682a9a4b..0c0ac4b84 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs @@ -7,8 +7,6 @@ namespace Flow.Launcher.Plugin.WebSearch { public class Settings : BaseModel { - private bool enableSuggestion; - public Settings() { SelectedSuggestion = Suggestions[0]; @@ -193,13 +191,17 @@ namespace Flow.Launcher.Plugin.WebSearch [JsonIgnore] public SearchSource SelectedSearchSource { get; set; } + private bool enableSuggestion; public bool EnableSuggestion { get => enableSuggestion; set { - enableSuggestion = value; - OnPropertyChanged(nameof(EnableSuggestion)); + if (enableSuggestion != value) + { + enableSuggestion = value; + OnPropertyChanged(nameof(EnableSuggestion)); + } } }