Use auto property.

This commit is contained in:
Huo Yaoyuan
2019-11-12 17:45:42 +08:00
parent 574de39b0d
commit bbeab6fa76
13 changed files with 31 additions and 60 deletions

View File

@ -58,9 +58,8 @@ namespace osu.Game.Overlays.Chat
private Message message;
private OsuSpriteText username;
private LinkFlowContainer contentFlow;
public LinkFlowContainer ContentFlow => contentFlow;
public LinkFlowContainer ContentFlow { get; private set; }
public Message Message
{
@ -164,7 +163,7 @@ namespace osu.Game.Overlays.Chat
Padding = new MarginPadding { Left = MessagePadding + HorizontalPadding },
Children = new Drawable[]
{
contentFlow = new LinkFlowContainer(t =>
ContentFlow = new LinkFlowContainer(t =>
{
t.Shadow = false;
@ -206,8 +205,8 @@ namespace osu.Game.Overlays.Chat
// remove non-existent channels from the link list
message.Links.RemoveAll(link => link.Action == LinkAction.OpenChannel && chatManager?.AvailableChannels.Any(c => c.Name == link.Argument) != true);
contentFlow.Clear();
contentFlow.AddLinks(message.DisplayContent, message.Links);
ContentFlow.Clear();
ContentFlow.AddLinks(message.DisplayContent, message.Links);
}
private class MessageSender : OsuClickableContainer, IHasContextMenu