mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Support read-only channels, post to correct channel.
Also cache drawable channels better.
This commit is contained in:
@ -27,6 +27,8 @@ namespace osu.Game.Online.Chat
|
||||
|
||||
//internal bool Joined;
|
||||
|
||||
public bool ReadOnly => Name != "#lazer";
|
||||
|
||||
public const int MAX_HISTORY = 300;
|
||||
|
||||
[JsonConstructor]
|
||||
|
@ -13,13 +13,13 @@ namespace osu.Game.Online.Chat.Drawables
|
||||
{
|
||||
public class DrawableChannel : Container
|
||||
{
|
||||
private readonly Channel channel;
|
||||
public readonly Channel Channel;
|
||||
private readonly FillFlowContainer flow;
|
||||
private readonly ScrollContainer scroll;
|
||||
|
||||
public DrawableChannel(Channel channel)
|
||||
{
|
||||
this.channel = channel;
|
||||
Channel = channel;
|
||||
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
|
||||
@ -48,14 +48,14 @@ namespace osu.Game.Online.Chat.Drawables
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
newMessagesArrived(channel.Messages);
|
||||
newMessagesArrived(Channel.Messages);
|
||||
scrollToEnd();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
channel.NewMessagesArrived -= newMessagesArrived;
|
||||
Channel.NewMessagesArrived -= newMessagesArrived;
|
||||
}
|
||||
|
||||
private void newMessagesArrived(IEnumerable<Message> newMessages)
|
||||
|
Reference in New Issue
Block a user