Skip to content
Snippets Groups Projects
Commit a44912e0 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

fix(news): 'a-la-une' tag was creating bug in other news display. Multiple...

fix(news): 'a-la-une' tag was creating bug in other news display. Multiple 'a-la-une' tag is now possible.
parent d8a36d45
No related branches found
No related tags found
2 merge requests!178release V1.10.0,!154Dev
...@@ -150,6 +150,11 @@ export class PostListComponent implements OnInit { ...@@ -150,6 +150,11 @@ export class PostListComponent implements OnInit {
// Split news on two columns on desktop mode or one column in mobile mode. // Split news on two columns on desktop mode or one column in mobile mode.
private setNews(news: PostWithMeta): void { 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; this.pagination = news.meta.pagination;
const customIndex = this.postsMobileView.length; // For scroll loading, start with previous index. const customIndex = this.postsMobileView.length; // For scroll loading, start with previous index.
news.posts.forEach((val, index) => { news.posts.forEach((val, index) => {
......
...@@ -26,9 +26,7 @@ export class PostService { ...@@ -26,9 +26,7 @@ export class PostService {
public getPosts(page: number, tags?: string[]): Observable<PostWithMeta> { public getPosts(page: number, tags?: string[]): Observable<PostWithMeta> {
if (!tags) { if (!tags) {
return this.http return this.http
.get<PostWithMeta>( .get<PostWithMeta>(`${this.baseUrl}?page=${page}&include=tags,authors&filter=tag:-[${TagEnum.appels}]`)
`${this.baseUrl}?page=${page}&include=tags,authors&filter=tag:-[${TagEnum.aLaUne},${TagEnum.appels}]`
)
.pipe(map((item: PostWithMeta) => new PostWithMeta(item))); .pipe(map((item: PostWithMeta) => new PostWithMeta(item)));
} }
let tagsString = ''; let tagsString = '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment