Add Test Case, improve displaying the avatar, use a chatTabControl instead of putting both in ChatOverlay, readd shadow.

Requires osu-framework for a fix
This commit is contained in:
miterosan
2018-04-11 18:23:09 +02:00
parent 85f736ae89
commit 39ecc3d31d
8 changed files with 263 additions and 55 deletions

View File

@ -7,6 +7,7 @@ using System.Collections.ObjectModel;
using System.Linq;
using osu.Framework.Configuration;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics;
using osu.Framework.Logging;
using osu.Framework.Threading;
using osu.Game.Online.API;
@ -18,7 +19,7 @@ namespace osu.Game.Online.Chat
/// <summary>
/// Manages everything chat related
/// </summary>
public class ChatManager : IOnlineComponent
public class ChatManager : Component, IOnlineComponent
{
/// <summary>
/// The channels the player joins on startup
@ -217,7 +218,7 @@ namespace osu.Game.Online.Chat
foreach (var withoutReplyGroup in withoutReplyGroups)
{
var chat = new UserChat(new User {Id = withoutReplyGroup.First().TargetId });
var chat = new UserChat(new User { Id = withoutReplyGroup.First().TargetId });
chat.AddNewMessages(withoutReplyGroup.ToArray());
OpenedUserChats.Add(chat);

View File

@ -38,5 +38,7 @@ namespace osu.Game.Online.Chat
req.Failure += exception => Logger.Error(exception, $"Requesting details for user with Id:{User.Id} failed.");
api.Queue(req);
}
public override string ToString() => User.Username ?? User.Id.ToString();
}
}