Temp: compatibility with full pinyin option

This commit is contained in:
VictoriousRaptor 2023-11-19 12:30:17 +08:00
parent f6ae71a99f
commit e5285b1992

View file

@ -29,7 +29,7 @@ namespace Flow.Launcher.Infrastructure
public (string translation, TranslationMapping map) Translate(string content)
{
if (_settings.ShouldUseDoublePin)
if (_settings.ShouldUsePinyin)
{
if (!_doublePinCache.ContainsKey(content))
{
@ -57,7 +57,7 @@ namespace Flow.Launcher.Infrastructure
{
if (content[i] >= 0x3400 && content[i] <= 0x9FD5)
{
string dp = ToDoublePin(resultList[i].ToLower());
string dp = _settings.ShouldUseDoublePin ? resultList[i] : ToDoublePin(resultList[i].ToLower());
map.AddNewIndex(i, resultBuilder.Length, dp.Length + 1);
resultBuilder.Append(' ');
resultBuilder.Append(dp);