From 2f5000f384b1a6a59b1e852effcae6a7652f94b0 Mon Sep 17 00:00:00 2001 From: AtaS Date: Mon, 21 Oct 2024 15:18:25 +0100 Subject: [PATCH] Return posts in random order --- SwipetorApp/Services/Posts/PostsQuerier.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SwipetorApp/Services/Posts/PostsQuerier.cs b/SwipetorApp/Services/Posts/PostsQuerier.cs index 8ccae22..b2884e7 100644 --- a/SwipetorApp/Services/Posts/PostsQuerier.cs +++ b/SwipetorApp/Services/Posts/PostsQuerier.cs @@ -37,7 +37,7 @@ public List 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();