mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-18 11:20:38 +01:00
Merge pull request #2035 from kazuki43zoo/gh-2015_count-conversations
Count multiple comments on the same line
This commit is contained in:
@@ -122,5 +122,8 @@
|
||||
</script>
|
||||
|
||||
@countConversation(comments: Seq[Comment]) = @{
|
||||
comments.count(c => c.isInstanceOf[CommitComments] || c.asInstanceOf[IssueComment].action.endsWith("comment"))
|
||||
comments.collect {
|
||||
case c: CommitComments => c.comments.size
|
||||
case c: IssueComment if c.action.endsWith("comment") => 1
|
||||
}.sum
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user