From aef50aa2dee1b68452c07ea54b4b02b9dfa135f1 Mon Sep 17 00:00:00 2001 From: runebaas Date: Sun, 12 May 2019 17:57:03 +0200 Subject: [PATCH] Revert "Use SortedDictionary for Highscores instead of a simple Dictionary" This reverts commit 4833ccd6 --- Geekbot.net/Commands/User/Ranking/Rank.cs | 4 ++-- Geekbot.net/Lib/Highscores/HighscoreManager.cs | 4 ++-- Geekbot.net/Lib/Highscores/IHighscoreManager.cs | 2 +- .../WebApi/Controllers/Highscores/HighscoreController.cs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Geekbot.net/Commands/User/Ranking/Rank.cs b/Geekbot.net/Commands/User/Ranking/Rank.cs index 1cd45e8..0ad21d5 100644 --- a/Geekbot.net/Commands/User/Ranking/Rank.cs +++ b/Geekbot.net/Commands/User/Ranking/Rank.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -63,7 +63,7 @@ namespace Geekbot.net.Commands.User.Ranking } var guildId = Context.Guild.Id; - SortedDictionary highscoreUsers; + Dictionary highscoreUsers; try { highscoreUsers = _highscoreManager.GetHighscoresWithUserData(type, guildId, amount); diff --git a/Geekbot.net/Lib/Highscores/HighscoreManager.cs b/Geekbot.net/Lib/Highscores/HighscoreManager.cs index 02a0b69..f3b3a18 100644 --- a/Geekbot.net/Lib/Highscores/HighscoreManager.cs +++ b/Geekbot.net/Lib/Highscores/HighscoreManager.cs @@ -20,7 +20,7 @@ namespace Geekbot.net.Lib.Highscores } - public SortedDictionary GetHighscoresWithUserData(HighscoreTypes type, ulong guildId, int amount) + public Dictionary GetHighscoresWithUserData(HighscoreTypes type, ulong guildId, int amount) { Dictionary list; switch (type) @@ -47,7 +47,7 @@ namespace Geekbot.net.Lib.Highscores throw new HighscoreListEmptyException($"No {type} found for guild {guildId}"); } - var highscoreUsers = new SortedDictionary(); + var highscoreUsers = new Dictionary(); foreach (var user in list) { try diff --git a/Geekbot.net/Lib/Highscores/IHighscoreManager.cs b/Geekbot.net/Lib/Highscores/IHighscoreManager.cs index aca3513..a09b07e 100644 --- a/Geekbot.net/Lib/Highscores/IHighscoreManager.cs +++ b/Geekbot.net/Lib/Highscores/IHighscoreManager.cs @@ -4,7 +4,7 @@ namespace Geekbot.net.Lib.Highscores { public interface IHighscoreManager { - SortedDictionary GetHighscoresWithUserData(HighscoreTypes type, ulong guildId, int amount); + Dictionary GetHighscoresWithUserData(HighscoreTypes type, ulong guildId, int amount); Dictionary GetMessageList(ulong guildId, int amount); Dictionary GetKarmaList(ulong guildId, int amount); Dictionary GetRollsList(ulong guildId, int amount); diff --git a/Geekbot.net/WebApi/Controllers/Highscores/HighscoreController.cs b/Geekbot.net/WebApi/Controllers/Highscores/HighscoreController.cs index 2b03260..3cccb0e 100644 --- a/Geekbot.net/WebApi/Controllers/Highscores/HighscoreController.cs +++ b/Geekbot.net/WebApi/Controllers/Highscores/HighscoreController.cs @@ -25,7 +25,7 @@ namespace Geekbot.net.WebApi.Controllers.Highscores return BadRequest(error); } - SortedDictionary list; + Dictionary list; try { list = _highscoreManager.GetHighscoresWithUserData(body.Type, body.GuildId, body.Amount);