mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
Pass "ShouldUsePinyin" to StringMatcher
Flag is used in method "ShouldUsePinyin()" to avoid calling Alphabet service. Otherwise, tests applying to StringMatcher.FuzzySearch() would fail because the pinyin helper library fails to initialize.
This commit is contained in:
@@ -24,7 +24,17 @@ namespace Wox.Infrastructure.UserSettings
|
||||
/// <summary>
|
||||
/// when false Alphabet static service will always return empty results
|
||||
/// </summary>
|
||||
public bool ShouldUsePinyin { get; set; } = true;
|
||||
private bool _shouldUsePinyin = true;
|
||||
public bool ShouldUsePinyin
|
||||
{
|
||||
get { return _shouldUsePinyin; }
|
||||
set
|
||||
{
|
||||
_shouldUsePinyin = value;
|
||||
StringMatcher.ShouldUsePinyin = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private string _querySearchPrecision { get; set; } = StringMatcher.SearchPrecisionScore.Regular.ToString();
|
||||
public string QuerySearchPrecision
|
||||
|
||||
Reference in New Issue
Block a user