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

Reduce API calls by checking what message was last marked as read

This commit is contained in:
Craftplacer 2020-01-12 16:24:14 +01:00
parent ccaf4e48a1
commit 8cc2d70df0

View File

@ -451,6 +451,9 @@ namespace osu.Game.Online.Chat
/// <param name="channel">The channel that will be marked as read</param>
public void MarkChannelAsRead(Channel channel)
{
if (channel.LastMessageId == channel.LastReadId)
return;
var message = channel.Messages.Last();
var req = new MarkChannelAsReadRequest(channel, message);