Improved ReactiveCommand.CreateFromTask

This commit is contained in:
2dust
2024-10-10 18:02:09 +08:00
parent 4f5362fdc4
commit a556bf9487
14 changed files with 209 additions and 202 deletions
@@ -43,12 +43,12 @@ namespace ServiceLib.ViewModels
await SaveSettingAsync();
});
ImportDefConfig4V2rayCmd = ReactiveCommand.Create(() =>
ImportDefConfig4V2rayCmd = ReactiveCommand.CreateFromTask(async () =>
{
normalDNS = Utils.GetEmbedText(Global.DNSV2rayNormalFileName);
});
ImportDefConfig4SingboxCmd = ReactiveCommand.Create(() =>
ImportDefConfig4SingboxCmd = ReactiveCommand.CreateFromTask(async () =>
{
normalDNS2 = Utils.GetEmbedText(Global.DNSSingboxNormalFileName);
tunDNS2 = Utils.GetEmbedText(Global.TunSingboxDNSFileName);