Append comments instead of setting

Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
Jonas Franz 2018-07-24 16:08:36 +02:00
parent dc4a27d109
commit 4c76cf5a76
No known key found for this signature in database
GPG Key ID: 506AEEBE80BEDECD

View File

@ -252,7 +252,7 @@ func (diff *Diff) LoadComments(issue *Issue, currentUser *User) error {
for _, section := range file.Sections {
for _, line := range section.Lines {
if comments, ok := lineCommits[int64(line.LeftIdx*-1)]; ok {
line.Comments = comments
line.Comments = append(line.Comments, comments...)
}
if comments, ok := lineCommits[int64(line.RightIdx)]; ok {
line.Comments = append(line.Comments, comments...)