mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
Add support for "Show/Hide outdated"
Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
@ -853,8 +853,13 @@ func fetchCodeCommentsByReview(e Engine, issue *Issue, currentUser *User, review
|
||||
IssueID: issue.ID,
|
||||
ReviewID: review.ID,
|
||||
}
|
||||
conds := opts.toConds()
|
||||
if review.ID == 0 {
|
||||
conds.And(builder.Eq{"invalidated": false})
|
||||
}
|
||||
|
||||
var comments []*Comment
|
||||
if err := e.Where(opts.toConds().And(builder.Eq{"invalidated": false})).
|
||||
if err := e.Where(conds).
|
||||
Asc("comment.created_unix").
|
||||
Asc("comment.id").
|
||||
Find(&comments); err != nil {
|
||||
|
Reference in New Issue
Block a user