Improve code quality

This commit is contained in:
Jack251970 2025-08-12 17:31:26 +08:00
parent 09d8cefcef
commit cc2df8d680

View file

@ -7,8 +7,6 @@ namespace Flow.Launcher.Plugin.WebSearch
{ {
public class Settings : BaseModel public class Settings : BaseModel
{ {
private bool enableSuggestion;
public Settings() public Settings()
{ {
SelectedSuggestion = Suggestions[0]; SelectedSuggestion = Suggestions[0];
@ -193,13 +191,17 @@ namespace Flow.Launcher.Plugin.WebSearch
[JsonIgnore] [JsonIgnore]
public SearchSource SelectedSearchSource { get; set; } public SearchSource SelectedSearchSource { get; set; }
private bool enableSuggestion;
public bool EnableSuggestion public bool EnableSuggestion
{ {
get => enableSuggestion; get => enableSuggestion;
set set
{ {
enableSuggestion = value; if (enableSuggestion != value)
OnPropertyChanged(nameof(EnableSuggestion)); {
enableSuggestion = value;
OnPropertyChanged(nameof(EnableSuggestion));
}
} }
} }