mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Reload on all settings change
This commit is contained in:
parent
eb81f7174f
commit
6317d0eec6
2 changed files with 23 additions and 4 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue