mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
Cache for pinyin https://github.com/Wox-launcher/Wox/issues/1189
This commit is contained in:
@@ -35,20 +35,6 @@ namespace Wox.Plugin.ControlPanel
|
||||
item.Icon.ToBitmap().Save(iconFolder + item.GUID + fileType);
|
||||
}
|
||||
}
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
var characters = controlPanelItems.Select(i => i.LocalizedString)
|
||||
.Concat(controlPanelItems.Select(i => i.InfoTip));
|
||||
|
||||
Parallel.ForEach(characters, c =>
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(c) && Alphabet.ContainsChinese(c))
|
||||
{
|
||||
Alphabet.PinyinComination(c);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public List<Result> Query(Query query)
|
||||
|
||||
@@ -83,19 +83,6 @@ namespace Wox.Plugin.Program
|
||||
});
|
||||
Task.WaitAll(t1, t2);
|
||||
|
||||
var characters = w.Select(p => p.Name)
|
||||
.Concat(w.Select(p => p.Description))
|
||||
.Concat(u.Select(p => p.DisplayName))
|
||||
.Concat(u.Select(p => p.Description));
|
||||
|
||||
Parallel.ForEach(characters, c =>
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(c) && Alphabet.ContainsChinese(c))
|
||||
{
|
||||
Alphabet.PinyinComination(c);
|
||||
}
|
||||
});
|
||||
|
||||
lock (IndexLock)
|
||||
{
|
||||
_win32s = w;
|
||||
|
||||
Reference in New Issue
Block a user