mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-22 00:54:26 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user