Code optimization, function asynchrony

This commit is contained in:
2dust
2024-10-20 11:51:05 +08:00
parent 50449df08d
commit 394b657fc9
29 changed files with 467 additions and 526 deletions

View File

@@ -84,7 +84,7 @@ namespace ServiceLib.ViewModels
}
SelectedSource.coreType = CoreType.IsNullOrEmpty() ? null : (ECoreType)Enum.Parse(typeof(ECoreType), CoreType);
if (ConfigHandler.AddServer(_config, SelectedSource) == 0)
if (await ConfigHandler.AddServer(_config, SelectedSource) == 0)
{
NoticeHandler.Instance.Enqueue(ResUI.OperationSuccess);
_updateView?.Invoke(EViewAction.CloseWindow, null);