1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 09:02:58 +08:00

Rename fetchMsgReq to fetchMessageReq in ChannelManager.cs

This commit is contained in:
miterosan 2018-07-23 22:09:05 +02:00
parent 2ae890366a
commit 9a6d92bb22

View File

@ -49,7 +49,7 @@ namespace osu.Game.Online.Chat
private IAPIProvider api;
private ScheduledDelegate fetchMessagesScheduleder;
private GetMessagesRequest fetchMsgReq;
private GetMessagesRequest fetchMessageReq;
private GetPrivateMessagesRequest fetchUserMsgReq;
private long? lastChannelMsgId;
private long? lastUserMsgId;
@ -156,16 +156,16 @@ namespace osu.Game.Online.Chat
private void fetchNewMessages()
{
if (fetchMsgReq == null)
if (fetchMessageReq == null)
fetchMessages(
() => fetchMsgReq = new GetMessagesRequest(JoinedChannels.Where(c => c.Target == TargetType.Channel), lastChannelMsgId),
() => fetchMessageReq = new GetMessagesRequest(JoinedChannels.Where(c => c.Target == TargetType.Channel), lastChannelMsgId),
messages =>
{
if (messages == null)
return;
handleChannelMessages(messages);
lastChannelMsgId = messages.LastOrDefault()?.Id ?? lastChannelMsgId;
fetchMsgReq = null;
fetchMessageReq = null;
}
);
@ -301,8 +301,8 @@ namespace osu.Game.Online.Chat
fetchMessagesScheduleder = Scheduler.AddDelayed(fetchNewMessages, 1000, true);
break;
default:
fetchMsgReq?.Cancel();
fetchMsgReq = null;
fetchMessageReq?.Cancel();
fetchMessageReq = null;
fetchMessagesScheduleder?.Cancel();
break;
}