mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-30 00:38:38 +00:00
Order hearted and queued levels by most recent first
This commit is contained in:
parent
263bfb5b23
commit
337124690d
1 changed files with 4 additions and 2 deletions
|
@ -70,13 +70,15 @@ public class UserPage : BaseLayout
|
||||||
if (this.User == this.ProfileUser)
|
if (this.User == this.ProfileUser)
|
||||||
{
|
{
|
||||||
this.QueuedSlots = await this.Database.QueuedLevels.Include(h => h.Slot)
|
this.QueuedSlots = await this.Database.QueuedLevels.Include(h => h.Slot)
|
||||||
.Where(h => this.User != null && h.UserId == this.User.UserId)
|
.Where(q => this.User != null && q.UserId == this.User.UserId)
|
||||||
.Select(h => h.Slot)
|
.OrderByDescending(q => q.QueuedLevelId)
|
||||||
|
.Select(q => q.Slot)
|
||||||
.Where(s => s.Type == SlotType.User)
|
.Where(s => s.Type == SlotType.User)
|
||||||
.Take(10)
|
.Take(10)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
this.HeartedSlots = await this.Database.HeartedLevels.Include(h => h.Slot)
|
this.HeartedSlots = await this.Database.HeartedLevels.Include(h => h.Slot)
|
||||||
.Where(h => this.User != null && h.UserId == this.User.UserId)
|
.Where(h => this.User != null && h.UserId == this.User.UserId)
|
||||||
|
.OrderByDescending(h => h.HeartedLevelId)
|
||||||
.Select(h => h.Slot)
|
.Select(h => h.Slot)
|
||||||
.Where(s => s.Type == SlotType.User)
|
.Where(s => s.Type == SlotType.User)
|
||||||
.Take(10)
|
.Take(10)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue