Show the window before slow location probes and wrap git.exe for commit, diff, and merge.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -35,11 +35,21 @@ public partial class App : System.Windows.Application
|
||||
.Build();
|
||||
|
||||
var vm = _host.Services.GetRequiredService<MainViewModel>();
|
||||
await vm.InitializeAsync().ConfigureAwait(true);
|
||||
await _host.StartAsync().ConfigureAwait(true);
|
||||
var window = _host.Services.GetRequiredService<MainWindow>();
|
||||
vm.PrepareUi();
|
||||
window.DataContext = vm;
|
||||
window.Show();
|
||||
try
|
||||
{
|
||||
await vm.InitializeAsync().ConfigureAwait(true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "Startup initialization failed");
|
||||
vm.Footer = "Started with errors. See logs.";
|
||||
}
|
||||
|
||||
await _host.StartAsync().ConfigureAwait(true);
|
||||
}
|
||||
|
||||
protected override async void OnExit(ExitEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user