From 5bcc659067a8da621a375943ae8b87896554ab12 Mon Sep 17 00:00:00 2001 From: Bluefissure Date: Sat, 12 Aug 2023 20:00:11 -0500 Subject: [PATCH] fix: cancel login after patching game --- src/XIVLauncher.Core/Components/MainPage/MainPage.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/XIVLauncher.Core/Components/MainPage/MainPage.cs b/src/XIVLauncher.Core/Components/MainPage/MainPage.cs index 4779966a..cd9a4071 100644 --- a/src/XIVLauncher.Core/Components/MainPage/MainPage.cs +++ b/src/XIVLauncher.Core/Components/MainPage/MainPage.cs @@ -406,8 +406,8 @@ private async Task TryProcessLoginResult(Launcher.LoginResult loginResult, return false; } - loginResult.State = Launcher.LoginState.Ok; - action = LoginAction.Game; + App.ShowMessageBlocking("Game is successfully patched, you can login now."); + return false; } if (loginResult.State == Launcher.LoginState.NeedRetry) @@ -430,9 +430,11 @@ private async Task TryProcessLoginResult(Launcher.LoginResult loginResult, Debug.Assert(loginResult.State == Launcher.LoginState.Ok); - if (loginResult.State == Launcher.LoginState.Ok && App.Accounts.CurrentAccount != null && loginResult.OauthLogin?.AutoLoginSessionKey != string.Empty) + if (loginResult.State == Launcher.LoginState.Ok + && App.Accounts.CurrentAccount != null + && !String.IsNullOrEmpty(loginResult.OauthLogin?.AutoLoginSessionKey)) { - App.Accounts.CurrentAccount.AutoLoginSessionKey = loginResult.OauthLogin!.AutoLoginSessionKey; + App.Accounts.CurrentAccount.AutoLoginSessionKey = loginResult.OauthLogin.AutoLoginSessionKey; App.Accounts.Save(); }