Skip to content

Commit

Permalink
PT-14386: skip filter pages by language (#663)
Browse files Browse the repository at this point in the history
* skip filter pages by language

* up java to 17

* Revert back unneeded java

* Revert back change

* Revert back change

---------

Co-authored-by: AlexTzykin <[email protected]>
Co-authored-by: Aleksandr Vishniakov <[email protected]>
  • Loading branch information
3 people authored Jan 17, 2024
1 parent a3fbcc7 commit 52fac70
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ IPagedList<MenuLinkList> Factory(int pageNumber, int pageSize, IEnumerable<SortI
return new StaticPagedList<MenuLinkList>(linkLists, pageNumber, pageSize, linkLists.Count());
}

return builder.WithMenuLinksAsync(new MutablePagedList<MenuLinkList>((Func<int, int, IEnumerable<SortInfo>, IPagedList<MenuLinkList>>) Factory, 1, 20));
return builder.WithMenuLinksAsync(new MutablePagedList<MenuLinkList>((Func<int, int, IEnumerable<SortInfo>, IPagedList<MenuLinkList>>)Factory, 1, 20));
}

public static Task WithPagesAsync(this IWorkContextBuilder builder, IMutablePagedList<ContentItem> pages)
Expand All @@ -66,11 +66,11 @@ public static Task WithPagesAsync(this IWorkContextBuilder builder, Store store,
// all static content items
IPagedList<ContentItem> Factory(int pageNumber, int pageSize, IEnumerable<SortInfo> sorInfos)
{
var contentItems = staticContentService.LoadStoreStaticContent(store, "pages", builder.WorkContext.IsPreviewMode).Where(x => x.Language.IsInvariant || x.Language == language);
var contentItems = staticContentService.LoadStoreStaticContent(store, "pages", builder.WorkContext.IsPreviewMode);
return new StaticPagedList<ContentItem>(contentItems, pageNumber, pageSize, contentItems.Count());
}

return builder.WithPagesAsync(new MutablePagedList<ContentItem>((Func<int, int, IEnumerable<SortInfo>, IPagedList<ContentItem>>) Factory, 1, 20));
return builder.WithPagesAsync(new MutablePagedList<ContentItem>((Func<int, int, IEnumerable<SortInfo>, IPagedList<ContentItem>>)Factory, 1, 20));
}

public static Task WithBlogsAsync(this IWorkContextBuilder builder, IMutablePagedList<Blog> blogs)
Expand Down

0 comments on commit 52fac70

Please sign in to comment.