From beefc6a86e236d2898295d79a4c8d6961f196b20 Mon Sep 17 00:00:00 2001 From: clueless <14300910+theClueless@users.noreply.github.com> Date: Sat, 25 Jan 2020 00:12:32 +0200 Subject: [PATCH] fix --- Wox.Infrastructure/UserSettings/Settings.cs | 1 + Wox/App.xaml.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Wox.Infrastructure/UserSettings/Settings.cs b/Wox.Infrastructure/UserSettings/Settings.cs index 73e13a838..7714768f0 100644 --- a/Wox.Infrastructure/UserSettings/Settings.cs +++ b/Wox.Infrastructure/UserSettings/Settings.cs @@ -30,6 +30,7 @@ public class Settings : BaseModel internal StringMatcher.SearchPrecisionScore QuerySearchPrecision { get; private set; } = StringMatcher.SearchPrecisionScore.Regular; + [JsonIgnore] public string QuerySearchPrecisionString { get { return QuerySearchPrecision.ToString(); } diff --git a/Wox/App.xaml.cs b/Wox/App.xaml.cs index 0dbd50abd..e75f04681 100644 --- a/Wox/App.xaml.cs +++ b/Wox/App.xaml.cs @@ -57,7 +57,8 @@ private void OnStartup(object sender, StartupEventArgs e) _settings = _settingsVM.Settings; _alphabet.Initialize(_settings); - StringMatcher.Instance = new StringMatcher(_alphabet); + _stringMatcher = new StringMatcher(_alphabet); + StringMatcher.Instance = _stringMatcher; _stringMatcher.UserSettingSearchPrecision = _settings.QuerySearchPrecision; PluginManager.LoadPlugins(_settings.PluginSettings);