mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Improve code quality
This commit is contained in:
parent
9e8a950580
commit
a8a305fce0
1 changed files with 8 additions and 8 deletions
|
|
@ -1,10 +1,10 @@
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Text;
|
|
||||||
using Flow.Launcher.Infrastructure.UserSettings;
|
|
||||||
using ToolGood.Words.Pinyin;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Text;
|
||||||
using CommunityToolkit.Mvvm.DependencyInjection;
|
using CommunityToolkit.Mvvm.DependencyInjection;
|
||||||
|
using Flow.Launcher.Infrastructure.UserSettings;
|
||||||
|
using ToolGood.Words.Pinyin;
|
||||||
|
|
||||||
namespace Flow.Launcher.Infrastructure
|
namespace Flow.Launcher.Infrastructure
|
||||||
{
|
{
|
||||||
|
|
@ -52,12 +52,12 @@ namespace Flow.Launcher.Infrastructure
|
||||||
|
|
||||||
var resultList = WordsHelper.GetPinyinList(content);
|
var resultList = WordsHelper.GetPinyinList(content);
|
||||||
|
|
||||||
StringBuilder resultBuilder = new StringBuilder();
|
var resultBuilder = new StringBuilder();
|
||||||
TranslationMapping map = new TranslationMapping();
|
var map = new TranslationMapping();
|
||||||
|
|
||||||
bool pre = false;
|
var pre = false;
|
||||||
|
|
||||||
for (int i = 0; i < resultList.Length; i++)
|
for (var i = 0; i < resultList.Length; i++)
|
||||||
{
|
{
|
||||||
if (content[i] >= 0x3400 && content[i] <= 0x9FD5)
|
if (content[i] >= 0x3400 && content[i] <= 0x9FD5)
|
||||||
{
|
{
|
||||||
|
|
@ -148,7 +148,7 @@ namespace Flow.Launcher.Infrastructure
|
||||||
private static string ToDoublePin(string fullPinyin)
|
private static string ToDoublePin(string fullPinyin)
|
||||||
{
|
{
|
||||||
// Assuming s is valid
|
// Assuming s is valid
|
||||||
StringBuilder doublePin = new StringBuilder();
|
var doublePin = new StringBuilder();
|
||||||
|
|
||||||
if (fullPinyin.Length <= 3 && (fullPinyin[0] == 'a' || fullPinyin[0] == 'e' || fullPinyin[0] == 'o'))
|
if (fullPinyin.Length <= 3 && (fullPinyin[0] == 'a' || fullPinyin[0] == 'e' || fullPinyin[0] == 'o'))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue