diff --git a/src/app/post/components/post-list/post-list.component.ts b/src/app/post/components/post-list/post-list.component.ts index 1d9b13b1225f91b27d03d8a5795345d56c30755b..14f617978e24fc07755fc88058d4e9c4958c1097 100644 --- a/src/app/post/components/post-list/post-list.component.ts +++ b/src/app/post/components/post-list/post-list.component.ts @@ -150,6 +150,11 @@ export class PostListComponent implements OnInit { // Split news on two columns on desktop mode or one column in mobile mode. private setNews(news: PostWithMeta): void { + if (this.bigNews) { + news.posts = news.posts.filter((elem) => { + return elem.id != this.bigNews.id; + }); + } this.pagination = news.meta.pagination; const customIndex = this.postsMobileView.length; // For scroll loading, start with previous index. news.posts.forEach((val, index) => { diff --git a/src/app/post/services/post.service.ts b/src/app/post/services/post.service.ts index 4bc4076daf7581c1d548aa4467a557bee9a2df3f..70423382e57f4f42a0fb51173fcd98b0624732a2 100644 --- a/src/app/post/services/post.service.ts +++ b/src/app/post/services/post.service.ts @@ -26,9 +26,7 @@ export class PostService { public getPosts(page: number, tags?: string[]): Observable<PostWithMeta> { if (!tags) { return this.http - .get<PostWithMeta>( - `${this.baseUrl}?page=${page}&include=tags,authors&filter=tag:-[${TagEnum.aLaUne},${TagEnum.appels}]` - ) + .get<PostWithMeta>(`${this.baseUrl}?page=${page}&include=tags,authors&filter=tag:-[${TagEnum.appels}]`) .pipe(map((item: PostWithMeta) => new PostWithMeta(item))); } let tagsString = '';