Commit 374bec5b authored by Lukas Mauß's avatar Lukas Mauß

Merge branch 'try-to-fix-comment-filter' into 'master'

Try to fix filter function for IOS

See merge request !372
parents 6191c75a a3799293
Pipeline #29786 passed with stages
in 8 minutes and 14 seconds
......@@ -256,16 +256,13 @@ export class CommentListComponent implements OnInit {
this.filteredComments = this.comments.filter(c => {
switch (type) {
case this.correct:
console.log(c.correct ? 1 : -1);
return (c.correct) ? 1 : (!c.correct) ? 0 : -1;
return (c.correct) ? true : false;
case this.favorite:
console.log(c.favorite ? 1 : -1);
return (c.favorite) ? 1 : (!c.favorite) ? 0 : -1;
return (c.favorite) ? true : false;
case this.read:
return (c.read) ? 1 : (!c.read) ? 0 : -1;
return (c.read) ? true : false;
case this.unread:
console.log(!c.read ? 1 : -1);
return (!c.read) ? 1 : (c.read) ? 0 : -1;
return (!c.read) ? true : false;
}
});
this.sortComments(this.currentSort);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment