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
efcce81536
commit
071b75bcb5
1 changed files with 1 additions and 4 deletions
|
|
@ -41,11 +41,8 @@ namespace Flow.Launcher.Infrastructure
|
|||
|
||||
private void CreateDoublePinyinTableFromStream(Stream jsonStream)
|
||||
{
|
||||
var table = JsonSerializer.Deserialize<Dictionary<string, Dictionary<string, string>>>(jsonStream);
|
||||
if (table == null)
|
||||
{
|
||||
var table = JsonSerializer.Deserialize<Dictionary<string, Dictionary<string, string>>>(jsonStream) ??
|
||||
throw new InvalidOperationException("Failed to deserialize double pinyin table: result is null");
|
||||
}
|
||||
|
||||
var schemaKey = _settings.DoublePinyinSchema.ToString();
|
||||
if (!table.TryGetValue(schemaKey, out var schemaDict))
|
||||
|
|
|
|||
Loading…
Reference in a new issue