Only use one tabControl (channeltabcontrol). Fix that the Channel messages did not refresh.

This commit is contained in:
miterosan
2018-04-18 20:46:42 +02:00
parent 142e1b8587
commit 29e8c70ed7
9 changed files with 30 additions and 107 deletions

View File

@ -47,8 +47,7 @@ namespace osu.Game.Online.Chat
/// </summary>
public ObservableCollection<Channel> AvailableChannels { get; } = new ObservableCollection<Channel>();
private APIAccess api;
private readonly Scheduler scheduler;
private IAPIProvider api;
private ScheduledDelegate fetchMessagesScheduleder;
private GetMessagesRequest fetchMsgReq;
private GetPrivateMessagesRequest fetchPrivateMsgReq;
@ -282,7 +281,7 @@ namespace osu.Game.Online.Chat
case APIState.Online:
if (JoinedChannels.Count == 0)
initializeDefaultChannels();
fetchMessagesScheduleder = scheduler.AddDelayed(fetchNewMessages, 1000, true);
fetchMessagesScheduleder = Scheduler.AddDelayed(fetchNewMessages, 1000, true);
break;
default:
fetchMsgReq?.Cancel();
@ -295,7 +294,7 @@ namespace osu.Game.Online.Chat
[BackgroundDependencyLoader]
private void load(IAPIProvider api)
{
this.api = this.api;
this.api = api;
api.Register(this);
}
}