Compare commits

..

No commits in common. "cf4d92c035f361d32ddab62b0be64e2ce8622dca" and "9991ecf1739ebbc1ff3c2190b3e923ee17323ef4" have entirely different histories.

2 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@
@await Html.PartialAsync("Partials/_MastodonStatus")
<div id="all-blog-posts">
@foreach (IBlogPost post in BlogPostService.GetBlogPosts(Model.PageNumber - 1))
@foreach (IBlogPost post in BlogPostService.GetBlogPosts(Model.PageNumber))
{
@await Html.PartialAsync("Partials/_BlogCard", post)
}

View File

@ -40,8 +40,8 @@ internal sealed class BlogPostService : IBlogPostService
{
using BlogContext context = _dbContextFactory.CreateDbContext();
return visibility == Visibility.None
? context.BlogPosts.Count(p => !p.IsRedirect)
: context.BlogPosts.Count(p => !p.IsRedirect && p.Visibility == visibility);
? context.BlogPosts.Count()
: context.BlogPosts.Count(p => p.Visibility == visibility);
}
/// <inheritdoc />