mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Replace ObservableCollection with BindableCollection
This commit is contained in:
@ -31,6 +31,9 @@ namespace osu.Game.Online.Chat
|
||||
@"#lobby"
|
||||
};
|
||||
|
||||
private readonly BindableCollection<Channel> availableChannels = new BindableCollection<Channel>();
|
||||
private readonly BindableCollection<Channel> joinedChannels = new BindableCollection<Channel>();
|
||||
|
||||
/// <summary>
|
||||
/// The currently opened channel
|
||||
/// </summary>
|
||||
@ -39,12 +42,12 @@ namespace osu.Game.Online.Chat
|
||||
/// <summary>
|
||||
/// The Channels the player has joined
|
||||
/// </summary>
|
||||
public ObservableCollection<Channel> JoinedChannels { get; } = new ObservableCollection<Channel>(); //todo: should be publicly readonly
|
||||
public IBindableCollection<Channel> JoinedChannels => joinedChannels;
|
||||
|
||||
/// <summary>
|
||||
/// The channels available for the player to join
|
||||
/// </summary>
|
||||
public ObservableCollection<Channel> AvailableChannels { get; } = new ObservableCollection<Channel>(); //todo: should be publicly readonly
|
||||
public IBindableCollection<Channel> AvailableChannels => availableChannels;
|
||||
|
||||
private IAPIProvider api;
|
||||
private ScheduledDelegate fetchMessagesScheduleder;
|
||||
@ -344,9 +347,10 @@ namespace osu.Game.Online.Chat
|
||||
{
|
||||
if (channel == null) return;
|
||||
|
||||
if (channel == CurrentChannel.Value) CurrentChannel.Value = null;
|
||||
if (channel == CurrentChannel.Value)
|
||||
CurrentChannel.Value = null;
|
||||
|
||||
JoinedChannels.Remove(channel);
|
||||
joinedChannels.Remove(channel);
|
||||
|
||||
if (channel.Joined.Value)
|
||||
{
|
||||
|
Reference in New Issue
Block a user