Fix #2001 and fix issue comments hidden (#2016)

* revert #2001 and fix issue comments hidden

* fix #2001

* fix import

* improve comment type

* reduce unnecessary join

* fix comment on FindCommentsOptions
This commit is contained in:
Lunny Xiao 2017-06-21 09:00:44 +08:00 committed by GitHub
parent 0a5dc640a1
commit d71fad2ab7
3 changed files with 68 additions and 27 deletions

View file

@ -174,7 +174,10 @@ func (issue *Issue) loadAttributes(e Engine) (err error) {
}
if issue.Comments == nil {
issue.Comments, err = getCommentsByIssueID(e, issue.ID)
issue.Comments, err = findComments(e, FindCommentsOptions{
IssueID: issue.ID,
Type: CommentTypeUnknown,
})
if err != nil {
return fmt.Errorf("getCommentsByIssueID [%d]: %v", issue.ID, err)
}