Reload on all settings change

This commit is contained in:
Jack251970 2025-07-14 19:29:12 +08:00
parent eb81f7174f
commit 6317d0eec6
2 changed files with 23 additions and 4 deletions

View file

@ -25,10 +25,17 @@ namespace Flow.Launcher.Infrastructure
_settings.PropertyChanged += (sender, e) => _settings.PropertyChanged += (sender, e) =>
{ {
if (e.PropertyName == nameof(Settings.UseDoublePinyin) || switch (e.PropertyName)
e.PropertyName == nameof(Settings.DoublePinyinSchema))
{ {
Reload(); case nameof(Settings.ShouldUsePinyin):
Reload();
break;
case nameof(Settings.UseDoublePinyin):
Reload();
break;
case nameof(Settings.DoublePinyinSchema):
Reload();
break;
} }
}; };
} }

View file

@ -328,7 +328,19 @@ namespace Flow.Launcher.Infrastructure.UserSettings
/// <summary> /// <summary>
/// when false Alphabet static service will always return empty results /// when false Alphabet static service will always return empty results
/// </summary> /// </summary>
public bool ShouldUsePinyin { get; set; } = false; private bool _useAlphabet = true;
public bool ShouldUsePinyin
{
get => _useAlphabet;
set
{
if (_useAlphabet != value)
{
_useAlphabet = value;
OnPropertyChanged();
}
}
}
private bool _useDoublePinyin = false; private bool _useDoublePinyin = false;
public bool UseDoublePinyin public bool UseDoublePinyin