1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 07:32:55 +08:00

Fix binding order

This commit is contained in:
Craftplacer 2021-06-05 11:03:49 +02:00
parent b3ac67675e
commit b746fe7c03
No known key found for this signature in database
GPG Key ID: 0D94BDA3F64B90CE

View File

@ -36,19 +36,18 @@ namespace osu.Game.Online.Chat
private Bindable<bool> notifyOnMention;
private Bindable<bool> notifyOnPM;
private readonly IBindable<User> localUser = new Bindable<User>();
private readonly BindableList<Channel> joinedChannels = new BindableList<Channel>();
private readonly IBindableList<Channel> joinedChannels = new BindableList<Channel>();
[BackgroundDependencyLoader]
private void load(OsuConfigManager config, IAPIProvider api)
{
notifyOnMention = config.GetBindable<bool>(OsuSetting.ChatHighlightName);
notifyOnPM = config.GetBindable<bool>(OsuSetting.ChatMessageNotification);
api.LocalUser.BindTo(localUser);
localUser.BindTo(api.LocalUser);
// Listen for new messages
joinedChannels.CollectionChanged += channelsChanged;
channelManager.JoinedChannels.BindTo(joinedChannels);
joinedChannels.BindTo(channelManager.JoinedChannels);
}
private void channelsChanged(object sender, NotifyCollectionChangedEventArgs e)