Skip to content

Commit

Permalink
Improve ordering of getting favourite/queued levels (#634)
Browse files Browse the repository at this point in the history
  • Loading branch information
jvyden authored Aug 12, 2024
2 parents c256cdd + f7203b3 commit 4e7e55f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Refresh.GameServer/Database/GameDatabaseContext.Relations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public DatabaseList<GameLevel> 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
Expand Down Expand Up @@ -152,7 +153,8 @@ public DatabaseList<GameLevel> 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)
Expand Down

0 comments on commit 4e7e55f

Please sign in to comment.