diff --git a/client/src/screens/LinkList/LinkListToolbar/components/TopTagsList.tsx b/client/src/screens/LinkList/LinkListToolbar/components/TopTagsList.tsx index c6afe6d..d42f116 100644 --- a/client/src/screens/LinkList/LinkListToolbar/components/TopTagsList.tsx +++ b/client/src/screens/LinkList/LinkListToolbar/components/TopTagsList.tsx @@ -31,7 +31,7 @@ const TopTagsList = observer(() => { show more )} - { showAll && ( + { showAll && sortedTags.length > MaxTagsShown && ( diff --git a/server/src/ShareLink.Application/GetLinkListHandler/GetLinkListHandler.cs b/server/src/ShareLink.Application/GetLinkListHandler/GetLinkListHandler.cs index f5f4688..af254f2 100644 --- a/server/src/ShareLink.Application/GetLinkListHandler/GetLinkListHandler.cs +++ b/server/src/ShareLink.Application/GetLinkListHandler/GetLinkListHandler.cs @@ -18,8 +18,6 @@ public async Task Handle(GetLinkListRequest request, Cancel } var query = context.Links - .AsNoTracking() - .Include(x => x.Tags) .FilterByTags(request.Tags) .FilterByTitle(request.Title) .FilterLiked(request.Liked, userId) @@ -46,12 +44,13 @@ public async Task Handle(GetLinkListRequest request, Cancel BelongsToUser = userId != null && userId == x.UserId, Editable = userId != null && userId == x.UserId }) + .AsNoTracking() .PaginatedListAsync(request.PageNumber, request.PageSize); var tags = await query - .Include(x => x.Tags).ThenInclude(x => x.Links) .SelectMany(x => x.Tags) .GroupBy(x => x.Name) .Select(x => new TagDto(x.Key, x.Count())) + .AsNoTracking() .ToArrayAsync(cancellationToken); return new GetLinkListResponse(links, tags);