Only pass needed setting to Alphabet

As Alphabet class is static, its methods could be used without
ever calling Alphabet.initialize(_settings) beforehand which would end
in an exception.  Therefor only _shouldUsePinyin settings needed will
be transferred with a given default value.
This commit is contained in:
SysC0mp
2019-12-03 14:55:22 +01:00
parent 05f66f9bea
commit 3d55ad783e
2 changed files with 44 additions and 34 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using System.Timers;
@@ -53,7 +53,7 @@ namespace Wox
_settingsVM = new SettingWindowViewModel();
_settings = _settingsVM.Settings;
Alphabet.Initialize(_settings);
Alphabet.Initialize(_settings.ShouldUsePinyin);
StringMatcher.UserSettingSearchPrecision = _settings.QuerySearchPrecision;