From b18959514d439bfb4571cb75dc1661e03c22a7bf Mon Sep 17 00:00:00 2001 From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com> Date: Thu, 19 Jun 2025 19:35:01 +0800 Subject: [PATCH] Add OnPropertyChanged() for double pinyin properties --- .../UserSettings/Settings.cs | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index e7306e3dd..ae3c4a396 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -290,9 +290,33 @@ namespace Flow.Launcher.Infrastructure.UserSettings /// public bool ShouldUsePinyin { get; set; } = false; - public bool UseDoublePinyin { get; set; } = true; //For developing + private bool _useDoublePinyin = true; // TODO: change default to false BEFORE RELEASE + public bool UseDoublePinyin + { + get => _useDoublePinyin; + set + { + if (_useDoublePinyin != value) + { + _useDoublePinyin = value; + OnPropertyChanged(); + } + } + } - public string DoublePinyinSchema { get; set; } = "XiaoHe"; //For developing + private string _doublePinyinSchema = "XiaoHe"; + public string DoublePinyinSchema + { + get => _doublePinyinSchema; + set + { + if (_doublePinyinSchema != value) + { + _doublePinyinSchema = value; + OnPropertyChanged(); + } + } + } public bool AlwaysPreview { get; set; } = false;