mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 21:53:22 +08:00
Fix binding order
This commit is contained in:
parent
b3ac67675e
commit
b746fe7c03
@ -36,19 +36,18 @@ namespace osu.Game.Online.Chat
|
|||||||
private Bindable<bool> notifyOnMention;
|
private Bindable<bool> notifyOnMention;
|
||||||
private Bindable<bool> notifyOnPM;
|
private Bindable<bool> notifyOnPM;
|
||||||
private readonly IBindable<User> localUser = new Bindable<User>();
|
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]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config, IAPIProvider api)
|
private void load(OsuConfigManager config, IAPIProvider api)
|
||||||
{
|
{
|
||||||
notifyOnMention = config.GetBindable<bool>(OsuSetting.ChatHighlightName);
|
notifyOnMention = config.GetBindable<bool>(OsuSetting.ChatHighlightName);
|
||||||
notifyOnPM = config.GetBindable<bool>(OsuSetting.ChatMessageNotification);
|
notifyOnPM = config.GetBindable<bool>(OsuSetting.ChatMessageNotification);
|
||||||
api.LocalUser.BindTo(localUser);
|
localUser.BindTo(api.LocalUser);
|
||||||
|
|
||||||
// Listen for new messages
|
// Listen for new messages
|
||||||
joinedChannels.CollectionChanged += channelsChanged;
|
joinedChannels.CollectionChanged += channelsChanged;
|
||||||
|
joinedChannels.BindTo(channelManager.JoinedChannels);
|
||||||
channelManager.JoinedChannels.BindTo(joinedChannels);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void channelsChanged(object sender, NotifyCollectionChangedEventArgs e)
|
private void channelsChanged(object sender, NotifyCollectionChangedEventArgs e)
|
||||||
|
Loading…
Reference in New Issue
Block a user