Better handling of logged in state

This commit is contained in:
Dean Herbert
2017-05-16 19:55:45 +09:00
parent 2384f7b0c1
commit 23807aa3b9
2 changed files with 12 additions and 2 deletions

View File

@ -353,7 +353,15 @@ namespace osu.Game.Overlays
{
var postText = textbox.Text;
if (string.IsNullOrEmpty(postText) || api.LocalUser.Value == null) return;
if (string.IsNullOrEmpty(postText))
return;
if (!api.IsLoggedIn)
{
currentChannel?.AddNewMessages(new ErrorMessage("Please login to participate in chat!"));
textbox.Text = string.Empty;
return;
}
if (currentChannel == null) return;