Hide outdated comments in file view (#5017)

* Hide outdated comments in file view

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add unit test by adding "invalidated" comment to fixtures

Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
Jonas Franz authored and techknowlogick committed 2018-10-05 11:49:30 -04:00
1 parent d7ca839c67
commit 94cd7bb25b
2 files changed
+12 -1

No files matched your search

+1 -1
View File
@@ -1084,7 +1084,7 @@ func fetchCodeCommentsByReview(e Engine, issue *Issue, currentUser *User, review
}
conds := opts.toConds()
if review.ID == 0 {
conds.And(builder.Eq{"invalidated": false})
conds = conds.And(builder.Eq{"invalidated": false})
}
var comments []*Comment