mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-02-22 05:46:12 -05:00
chore(performance): loadCommentsByType sets Issues
Keep the setting of comment.Issues from the refactor. It is cheap and potentially saves loading the issue again. Former title: Some small refactors (#33144) (cherry picked from commit d3083d21981f9445cf7570956a1fdedfc8578b56) Conflicts: models/issues/comment_list.go models/issues/issue_list.go routers/web/repo/issue_view.go
This commit is contained in:
parent
d09b8ba9cf
commit
f2feb34927
1 changed files with 3 additions and 0 deletions
|
@ -268,6 +268,9 @@ func (issue *Issue) loadCommentsByType(ctx context.Context, tp CommentType) (err
|
||||||
IssueID: issue.ID,
|
IssueID: issue.ID,
|
||||||
Type: tp,
|
Type: tp,
|
||||||
})
|
})
|
||||||
|
for _, comment := range issue.Comments {
|
||||||
|
comment.Issue = issue
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue