Skip to content

Commit 0980290

Browse files
committed
修复错误的退出语义
1 parent bfec2a8 commit 0980290

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/XIVLauncher/Windows/ViewModel/MainWindowViewModel.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -409,12 +409,7 @@ LoginAfterAction action
409409
: 0;
410410

411411
if (await ProcessLoginResultAsync(gameLaunchContext, action).ConfigureAwait(false))
412-
{
413-
if (App.Settings.ExitLauncherWhenGameExit)
414-
Environment.Exit(0);
415-
416412
Activate();
417-
}
418413
}
419414

420415
private async Task HandleLoginWorkflowExceptionAsync(Exception ex, LoginType loginType, string username, bool usedSavedWeGameToken, LoginAfterAction action)
@@ -1432,7 +1427,9 @@ private void HandleStartGameFromDashboard(LoginAfterAction action)
14321427
{
14331428
try
14341429
{
1435-
await ProcessLoginResultAsync(currentGameLaunchContext, action).ConfigureAwait(false);
1430+
if (await ProcessLoginResultAsync(currentGameLaunchContext, action).ConfigureAwait(false)
1431+
&& App.Settings.ExitLauncherWhenGameExit)
1432+
Environment.Exit(0);
14361433
}
14371434
catch (Exception ex)
14381435
{

0 commit comments

Comments
 (0)