feat: update node IP and delay info on connect (#10050)

* feat: update node IP and delay info on connect

* Adjust

---------

Co-authored-by: 2dust <31833384+2dust@users.noreply.github.com>
This commit is contained in:
Loukky
2026-09-02 16:46:15 +08:00
committed by GitHub
co-authored by 2dust
parent f62eaab8c5
commit f03db020fa
4 changed files with 36 additions and 7 deletions
@@ -690,7 +690,18 @@ public partial class MainWindowViewModel : MyReactiveObject
});
RxSchedulers.MainThreadScheduler.Schedule(async () =>
{
await StatusBarViewModel.TestServerAvailability();
var result = await StatusBarViewModel.TestServerAvailability();
if (result == null || profileItem.IndexId.IsNullOrEmpty())
{
return;
}
await ProfilesViewModel.SetSpeedTestResult(new()
{
IndexId = profileItem.IndexId,
IpInfo = result.Ip,
Delay = result.Time > 0 ? result.Time.ToString() : null
});
});
var showClashUI = AppManager.Instance.IsRunningCore(ECoreType.sing_box);