mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 02:23:01 +08:00
fix: 尝试修复运行时下载完成更新包后卡死
This commit is contained in:
@@ -238,7 +238,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
await Task.Delay(delayTime);
|
||||
await Instances.SettingsViewModel.ManualUpdate();
|
||||
_ = Instances.SettingsViewModel.ManualUpdate();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -589,13 +589,19 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
{
|
||||
if (Instances.SettingsViewModel.AutoInstallUpdatePackage)
|
||||
{
|
||||
while (!runningState.GetIdle())
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
Thread.Sleep(60000);
|
||||
}
|
||||
while (!runningState.GetIdle())
|
||||
{
|
||||
await Task.Delay(60000);
|
||||
}
|
||||
|
||||
Application.Current.Shutdown();
|
||||
Bootstrapper.RestartApplication();
|
||||
Application.Current.Dispatcher.Invoke(() =>
|
||||
{
|
||||
Application.Current.Shutdown();
|
||||
Bootstrapper.RestartApplication();
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user