Skip to content

Commit

Permalink
Return posts in random order
Browse files Browse the repository at this point in the history
  • Loading branch information
atas committed Oct 21, 2024
1 parent c386304 commit 2f5000f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SwipetorApp/Services/Posts/PostsQuerier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public List<PostQueryModel> Run(DbCx db)
if (UserId != null) _query = _query.Where(p => p.UserId == UserId);

// Show not-viewed posts firsts
_query = _query.OrderBy(p => p.PostViews.Any(pv => pv.UserId == _userIdOrNull)).ThenBy(p => Guid.NewGuid());
_query = _query.OrderBy(p => Guid.NewGuid());

if (HubIds is { Count: > 0 })
SetHubs();
Expand Down

0 comments on commit 2f5000f

Please sign in to comment.