Optimize the information function

This commit is contained in:
2dust
2024-09-16 11:09:44 +08:00
parent c4e01d20a0
commit 233d605256
3 changed files with 10 additions and 19 deletions
+3 -7
View File
@@ -261,14 +261,10 @@ namespace ServiceLib.Handler
_updateFunc(true, string.Format(ResUI.MsgDownloadGeoFileSuccessfully, "geo"));
}
public void RunAvailabilityCheck(Action<bool, string> update)
public async Task RunAvailabilityCheck(Action<bool, string> update)
{
Task.Run(async () =>
{
var time = await (new DownloadHandler()).RunAvailabilityCheck(null);
update(false, string.Format(ResUI.TestMeOutput, time));
});
var time = await (new DownloadHandler()).RunAvailabilityCheck(null);
update(false, string.Format(ResUI.TestMeOutput, time));
}
#region private