Skip to content

Commit

Permalink
fix: Make the login/register buttons always update disablement, somet…
Browse files Browse the repository at this point in the history
…imes they are finicky and are showing disabled incorrectly
  • Loading branch information
lodicolo committed Jan 25, 2025
1 parent cd40256 commit 997f4a6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Intersect.Client.Core/Interface/Menu/MainMenuWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,17 @@ internal void Update()
_buttonLogin.IsDisabled = Globals.WaitingOnServer;
_buttonRegister.IsDisabled = Globals.WaitingOnServer;
}
else
{
UpdateDisabled();
}
}


internal void UpdateDisabled()
{
var isOffline = MainMenu.ActiveNetworkStatus != NetworkStatus.Online;
var networkStatus = MainMenu.ActiveNetworkStatus;
var isOffline = networkStatus != NetworkStatus.Online;
_buttonLogin.IsDisabled = isOffline;
_buttonRegister.IsDisabled = isOffline || (Options.IsLoaded && Options.Instance.BlockClientRegistrations);
}
Expand Down

0 comments on commit 997f4a6

Please sign in to comment.