fixup the reduced code due to testing

This commit is contained in:
弘韬 张 2020-10-18 11:48:17 +08:00
parent 4ebfba76a3
commit dd2d3c68c1

View file

@ -36,8 +36,8 @@ namespace Flow.Launcher.Infrastructure
{ {
if (WordsHelper.HasChinese(content)) if (WordsHelper.HasChinese(content))
{ {
var result = WordsHelper.GetPinyin(content,";"); var result = WordsHelper.GetPinyin(content, ";");
result = GetFirstPinyinChar(result) + result.Replace(";",""); result = GetFirstPinyinChar(result) + result.Replace(";", "");
_pinyinCache[content] = result; _pinyinCache[content] = result;
return result; return result;
} }
@ -46,6 +46,8 @@ namespace Flow.Launcher.Infrastructure
return content; return content;
} }
} }
else
return _pinyinCache[content];
} }
else else
{ {