From 337124690d7ee4b9d26a20f7ca49ed20aa401f9e Mon Sep 17 00:00:00 2001 From: Slendy Date: Wed, 4 Jan 2023 20:17:26 -0600 Subject: [PATCH] Order hearted and queued levels by most recent first --- ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml.cs b/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml.cs index e52a8f53..1e32515e 100644 --- a/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml.cs +++ b/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml.cs @@ -70,13 +70,15 @@ public class UserPage : BaseLayout if (this.User == this.ProfileUser) { this.QueuedSlots = await this.Database.QueuedLevels.Include(h => h.Slot) - .Where(h => this.User != null && h.UserId == this.User.UserId) - .Select(h => h.Slot) + .Where(q => this.User != null && q.UserId == this.User.UserId) + .OrderByDescending(q => q.QueuedLevelId) + .Select(q => q.Slot) .Where(s => s.Type == SlotType.User) .Take(10) .ToListAsync(); this.HeartedSlots = await this.Database.HeartedLevels.Include(h => h.Slot) .Where(h => this.User != null && h.UserId == this.User.UserId) + .OrderByDescending(h => h.HeartedLevelId) .Select(h => h.Slot) .Where(s => s.Type == SlotType.User) .Take(10)