From 9ae805538ac7db406a0fac6fa1692d7ed57423c6 Mon Sep 17 00:00:00 2001 From: oliverpool Date: Mon, 8 Apr 2024 15:24:00 +0200 Subject: [PATCH] Use HasAttachmentSupport method --- models/issues/comment_list.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/models/issues/comment_list.go b/models/issues/comment_list.go index 0047b054b..347dbe99e 100644 --- a/models/issues/comment_list.go +++ b/models/issues/comment_list.go @@ -377,9 +377,7 @@ func (comments CommentList) loadDependentIssues(ctx context.Context) error { func (comments CommentList) getAttachmentCommentIDs() []int64 { ids := make(container.Set[int64], len(comments)) for _, comment := range comments { - if comment.Type == CommentTypeComment || - comment.Type == CommentTypeReview || - comment.Type == CommentTypeCode { + if comment.Type.HasAttachmentSupport() { ids.Add(comment.ID) } }