mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 02:23:01 +08:00
fix: 修复更新后弹窗错误
This commit is contained in:
@@ -193,22 +193,6 @@ namespace MaaWpfGui.Main
|
||||
Instances.InstantiateOnRootViewDisplayed(Container);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override void OnLaunch()
|
||||
{
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await Instances.AnnouncementViewModel.CheckAndDownloadAnnouncement();
|
||||
if (Instances.AnnouncementViewModel.DoNotRemindThisAnnouncementAgain)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_ = Execute.OnUIThreadAsync(() => Instances.WindowManager.ShowWindow(Instances.AnnouncementViewModel));
|
||||
});
|
||||
Instances.VersionUpdateViewModel.ShowUpdateOrDownload();
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
/// <remarks>退出时执行啥自己加。</remarks>
|
||||
protected override void OnExit(ExitEventArgs e)
|
||||
|
||||
@@ -38,6 +38,17 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
|
||||
InitViewModels();
|
||||
InitProxy();
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await Instances.AnnouncementViewModel.CheckAndDownloadAnnouncement();
|
||||
if (Instances.AnnouncementViewModel.DoNotRemindThisAnnouncementAgain)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_ = Execute.OnUIThreadAsync(() => Instances.WindowManager.ShowWindow(Instances.AnnouncementViewModel));
|
||||
});
|
||||
Instances.VersionUpdateViewModel.ShowUpdateOrDownload();
|
||||
}
|
||||
|
||||
private static async void InitProxy()
|
||||
|
||||
Reference in New Issue
Block a user