Improved Action Invoke

This commit is contained in:
2dust
2024-10-08 13:47:13 +08:00
parent 3e74bb65bd
commit 53e19ecb1d
16 changed files with 113 additions and 126 deletions
@@ -38,9 +38,9 @@ namespace ServiceLib.ViewModels
normalDNS2 = item2?.normalDNS ?? string.Empty;
tunDNS2 = item2?.tunDNS ?? string.Empty;
SaveCmd = ReactiveCommand.Create(() =>
SaveCmd = ReactiveCommand.CreateFromTask(async () =>
{
SaveSettingAsync();
await SaveSettingAsync();
});
ImportDefConfig4V2rayCmd = ReactiveCommand.Create(() =>
@@ -65,7 +65,7 @@ namespace ServiceLib.ViewModels
}
else
{
if (normalDNS.Contains("{") || normalDNS.Contains("}"))
if (normalDNS.Contains('{') || normalDNS.Contains('}'))
{
NoticeHandler.Instance.Enqueue(ResUI.FillCorrectDNSText);
return;