Revert "Use SortedDictionary for Highscores instead of a simple Dictionary"

This reverts commit 4833ccd6
This commit is contained in:
runebaas 2019-05-12 17:57:03 +02:00
parent 4833ccd65a
commit aef50aa2de
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
4 changed files with 6 additions and 6 deletions

View file

@ -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<HighscoreUserDto, int> highscoreUsers;
Dictionary<HighscoreUserDto, int> highscoreUsers;
try
{
highscoreUsers = _highscoreManager.GetHighscoresWithUserData(type, guildId, amount);

View file

@ -20,7 +20,7 @@ namespace Geekbot.net.Lib.Highscores
}
public SortedDictionary<HighscoreUserDto, int> GetHighscoresWithUserData(HighscoreTypes type, ulong guildId, int amount)
public Dictionary<HighscoreUserDto, int> GetHighscoresWithUserData(HighscoreTypes type, ulong guildId, int amount)
{
Dictionary<ulong, int> 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<HighscoreUserDto, int>();
var highscoreUsers = new Dictionary<HighscoreUserDto, int>();
foreach (var user in list)
{
try

View file

@ -4,7 +4,7 @@ namespace Geekbot.net.Lib.Highscores
{
public interface IHighscoreManager
{
SortedDictionary<HighscoreUserDto, int> GetHighscoresWithUserData(HighscoreTypes type, ulong guildId, int amount);
Dictionary<HighscoreUserDto, int> GetHighscoresWithUserData(HighscoreTypes type, ulong guildId, int amount);
Dictionary<ulong, int> GetMessageList(ulong guildId, int amount);
Dictionary<ulong, int> GetKarmaList(ulong guildId, int amount);
Dictionary<ulong, int> GetRollsList(ulong guildId, int amount);

View file

@ -25,7 +25,7 @@ namespace Geekbot.net.WebApi.Controllers.Highscores
return BadRequest(error);
}
SortedDictionary<HighscoreUserDto, int> list;
Dictionary<HighscoreUserDto, int> list;
try
{
list = _highscoreManager.GetHighscoresWithUserData(body.Type, body.GuildId, body.Amount);