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:
parent
ccaf4e48a1
commit
8cc2d70df0
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user