Skip to content

Commit

Permalink
Improve ordering of getting favourite/queued levels
Browse files Browse the repository at this point in the history
  • Loading branch information
jvyden committed Aug 11, 2024
1 parent c256cdd commit f7203b3
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 f7203b3

Please sign in to comment.