From caa29e1f9ecff4c86e973a7ad7309c482d13927d Mon Sep 17 00:00:00 2001 From: tornac1234 Date: Wed, 1 Jun 2022 12:05:24 +0200 Subject: [PATCH] Removed ruleset rankings request from DiscordRichPresence.cs --- osu.Desktop/DiscordRichPresence.cs | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/osu.Desktop/DiscordRichPresence.cs b/osu.Desktop/DiscordRichPresence.cs index 14fea7a08d..0d276d963f 100644 --- a/osu.Desktop/DiscordRichPresence.cs +++ b/osu.Desktop/DiscordRichPresence.cs @@ -12,7 +12,6 @@ using osu.Framework.Logging; using osu.Game.Configuration; using osu.Game.Extensions; using osu.Game.Online.API; -using osu.Game.Online.API.Requests; using osu.Game.Online.API.Requests.Responses; using osu.Game.Rulesets; using osu.Game.Users; @@ -81,7 +80,7 @@ namespace osu.Desktop private void onReady(object _, ReadyMessage __) { Logger.Log("Discord RPC Client ready.", LoggingTarget.Network, LogLevel.Debug); - requestUserRulesetsRankings(); + updateStatus(); } private void updateStatus() @@ -124,26 +123,6 @@ namespace osu.Desktop client.SetPresence(presence); } - private void requestUserRulesetsRankings() - { - RulesetInfo cachedRuleset = ruleset.Value; - - var req = new GetUsersRequest(new int[] { provider.LocalUser.Value.Id }); - req.Success += result => - { - if (result.Users.Count == 1) - { - APIUser apiUser = result.Users[0]; - user.Value.RulesetsStatistics = apiUser.RulesetsStatistics; - } - - updateStatus(); - }; - req.Failure += _ => updateStatus(); - - provider.Queue(req); - } - private static readonly int ellipsis_length = Encoding.UTF8.GetByteCount(new[] { '…' }); private string truncate(string str)