mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 09:57:21 +09:00
Fix unnecessary messages retrieval
This commit is contained in:
parent
1fd2782dd4
commit
f0b1aa7edf
@ -449,13 +449,15 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
fetchReq.Success += updates =>
|
fetchReq.Success += updates =>
|
||||||
{
|
{
|
||||||
// fuck the what.
|
|
||||||
if (updates?.Presence != null)
|
if (updates?.Presence != null)
|
||||||
{
|
{
|
||||||
foreach (var channel in updates.Presence)
|
foreach (var channel in updates.Presence)
|
||||||
{
|
{
|
||||||
channel.Joined.Value = true;
|
if (careChannels.Find(c => c.Id == channel.Id) == null)
|
||||||
addChannel(channel);
|
{
|
||||||
|
channel.Joined.Value = true;
|
||||||
|
addChannel(channel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var group in updates.Messages.Where(m => m.TargetType == TargetType.Channel).GroupBy(m => m.TargetId))
|
foreach (var group in updates.Messages.Where(m => m.TargetType == TargetType.Channel).GroupBy(m => m.TargetId))
|
||||||
@ -464,13 +466,11 @@ namespace osu.Game.Overlays
|
|||||||
lastMessageId = updates.Messages.LastOrDefault()?.Id ?? lastMessageId;
|
lastMessageId = updates.Messages.LastOrDefault()?.Id ?? lastMessageId;
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Write("success!");
|
|
||||||
fetchReq = null;
|
fetchReq = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
fetchReq.Failure += delegate
|
fetchReq.Failure += delegate
|
||||||
{
|
{
|
||||||
Debug.Write("failure!");
|
|
||||||
fetchReq = null;
|
fetchReq = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user