Try to fix
Some checks failed
release Linux / build (Release) (push) Has been cancelled
release macOS / build (Release) (push) Has been cancelled
release Windows desktop (Avalonia UI) / build (Release) (push) Has been cancelled
release Windows / build (Release) (push) Has been cancelled

https://github.com/2dust/v2rayN/issues/7128
This commit is contained in:
2dust 2025-04-18 12:31:46 +08:00
parent 456ffb200a
commit 23eeb8ff55
2 changed files with 9 additions and 3 deletions

View file

@ -548,8 +548,11 @@ public class MainWindowViewModel : MyReactiveObject
BlReloadEnabled = false;
await LoadCore();
await SysProxyHandler.UpdateSysProxy(_config, false);
await Task.Run(async () =>
{
await LoadCore();
await SysProxyHandler.UpdateSysProxy(_config, false);
});
Locator.Current.GetService<StatusBarViewModel>()?.TestServerAvailability();
_updateView?.Invoke(EViewAction.DispatcherReload, null);

View file

@ -318,7 +318,10 @@ public class StatusBarViewModel : MyReactiveObject
_updateView?.Invoke(EViewAction.DispatcherServerAvailability, ResUI.Speedtesting);
var msg = await (new UpdateService()).RunAvailabilityCheck();
var msg = await Task.Run(async () =>
{
return await (new UpdateService()).RunAvailabilityCheck();
});
NoticeHandler.Instance.SendMessageEx(msg);
_updateView?.Invoke(EViewAction.DispatcherServerAvailability, msg);