hopefully it's fine now?
This commit is contained in:
@@ -947,13 +947,16 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
||||
}
|
||||
}
|
||||
|
||||
if (_discordOAuthCheck != null && _discordOAuthCheck.IsCompleted)
|
||||
if (_discordOAuthCheck != null && _discordOAuthCheck.IsCompleted && _discordOAuthCheck.Result != null)
|
||||
{
|
||||
if (IconTextButton(FontAwesomeIcon.ArrowRight, "Authenticate with Server"))
|
||||
if (_discordOAuthGetCode == null)
|
||||
{
|
||||
_discordOAuthGetCode = _serverConfigurationManager.GetDiscordOAuthToken(_discordOAuthCheck.Result!, selectedServer.ServerUri, _discordOAuthGetCts.Token);
|
||||
if (IconTextButton(FontAwesomeIcon.ArrowRight, "Authenticate with Server"))
|
||||
{
|
||||
_discordOAuthGetCode = _serverConfigurationManager.GetDiscordOAuthToken(_discordOAuthCheck.Result, selectedServer.ServerUri, _discordOAuthGetCts.Token);
|
||||
}
|
||||
}
|
||||
else if (_discordOAuthGetCode != null && !_discordOAuthGetCode.IsCompleted)
|
||||
else if (!_discordOAuthGetCode.IsCompleted)
|
||||
{
|
||||
TextWrapped("A browser window has been opened, follow it to authenticate. Click the button below if you accidentally closed the window and need to restart the authentication.");
|
||||
if (IconTextButton(FontAwesomeIcon.Ban, "Cancel Authentication"))
|
||||
@@ -962,7 +965,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
||||
_discordOAuthGetCode = null;
|
||||
}
|
||||
}
|
||||
else if (_discordOAuthGetCode != null && _discordOAuthGetCode.IsCompleted)
|
||||
else
|
||||
{
|
||||
TextWrapped("Discord OAuth is completed, status: ");
|
||||
ImGui.SameLine();
|
||||
|
||||
Reference in New Issue
Block a user