From f7203b399db088144f95ed2b4cd832dad83658dc Mon Sep 17 00:00:00 2001 From: jvyden Date: Sun, 11 Aug 2024 15:42:12 -0400 Subject: [PATCH] Improve ordering of getting favourite/queued levels --- .../Database/GameDatabaseContext.Relations.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Refresh.GameServer/Database/GameDatabaseContext.Relations.cs b/Refresh.GameServer/Database/GameDatabaseContext.Relations.cs index a29b4a82..9166f6fa 100644 --- a/Refresh.GameServer/Database/GameDatabaseContext.Relations.cs +++ b/Refresh.GameServer/Database/GameDatabaseContext.Relations.cs @@ -26,7 +26,8 @@ public DatabaseList GetLevelsFavouritedByUser(GameUser user, int coun .AsEnumerable() .Select(r => r.Level) .FilterByLevelFilterSettings(accessor, levelFilterSettings) - .FilterByGameVersion(levelFilterSettings.GameVersion), skip, count); + .FilterByGameVersion(levelFilterSettings.GameVersion) + .OrderByDescending(l => l.PublishDate), skip, count); public int GetTotalLevelsFavouritedByUser(GameUser user) => this.FavouriteLevelRelations @@ -152,7 +153,8 @@ public DatabaseList GetLevelsQueuedByUser(GameUser user, int count, i .AsEnumerable() .Select(r => r.Level) .FilterByLevelFilterSettings(accessor, levelFilterSettings) - .FilterByGameVersion(levelFilterSettings.GameVersion), skip, count); + .FilterByGameVersion(levelFilterSettings.GameVersion) + .OrderByDescending(l => l.PublishDate), skip, count); [Pure] public int GetTotalLevelsQueuedByUser(GameUser user)