Resolve dev paths and fix splash UI thread

Compute a solutionRoot and expand development search paths (LanMountainDesktop and dev-test) in DeploymentLocator, add logging when scanning/finding hosts, and return distinct full paths. Ensure backward-compatible path checks. Fix cross-thread UI calls: invoke splashWindow.DismissAsync on the UI thread in LauncherFlowCoordinator, and make SplashWindow.DismissAsync ensure it runs on the UI thread before closing (simplified Close call). These changes improve development host discovery and prevent UI-thread access issues during shutdown.
This commit is contained in:
lincube
2026-04-24 10:05:30 +08:00
parent 9de93d2a4d
commit 28f41cd27c
3 changed files with 37 additions and 27 deletions

View File

@@ -79,6 +79,14 @@ public partial class SplashWindow : Window, ISplashStageReporter
}
_dismissed = true;
// 确保在UI线程上执行
if (!Dispatcher.UIThread.CheckAccess())
{
await Dispatcher.UIThread.InvokeAsync(async () => await DismissAsync());
return;
}
ConfigureForVisualMode();
if (_mode == StartupVisualMode.SlideSplash)
@@ -91,13 +99,7 @@ public partial class SplashWindow : Window, ISplashStageReporter
await AnimateOpacityAsync(Opacity, 0d, FadeAnimationDuration).ConfigureAwait(false);
}
await Dispatcher.UIThread.InvokeAsync(() =>
{
if (IsVisible)
{
Close();
}
});
Close();
}
public void Report(string stage, string message)