diff --git a/src/main/scala/app/IssuesController.scala b/src/main/scala/app/IssuesController.scala index 1c05cf1..d2e4082 100644 --- a/src/main/scala/app/IssuesController.scala +++ b/src/main/scala/app/IssuesController.scala @@ -62,12 +62,9 @@ val issueId = params("id") getIssue(owner, name, issueId) map { - val comments = getComments(owner, name, issueId.toInt) - val participantSet = comments.foldRight(Set(owner)) { (comment, set) => set + comment.commentedUserName } issues.html.issue( _, - comments, - participantSet, + getComments(owner, name, issueId.toInt), getIssueLabels(owner, name, issueId.toInt), (getCollaborators(owner, name) :+ owner).sorted, getMilestones(owner, name), diff --git a/src/main/twirl/issues/issue.scala.html b/src/main/twirl/issues/issue.scala.html index 24cad3a..c71f4da 100644 --- a/src/main/twirl/issues/issue.scala.html +++ b/src/main/twirl/issues/issue.scala.html @@ -1,6 +1,5 @@ @(issue: model.Issue, comments: List[model.IssueComment], - participants: Set[String], issueLabels: List[model.Label], collaborators: List[String], milestones: List[model.Milestone], @@ -83,8 +82,10 @@
- @participants.size participants - @participants.map { participant => @avatar(participant, 20) } + @defining((issue.openedUserName :: comments.map(_.commentedUserName)).distinct){ participants => + @participants.size @plural(participants.size, "participant") + @participants.map { participant => @avatar(participant, 20, tooltip = true) } + }
@comments.map { comment => @if(comment.action != "close" && comment.action != "reopen"){