diff options
author | Dylan Hardison <dylan@mozilla.com> | 2016-05-20 22:31:46 +0200 |
---|---|---|
committer | Dylan Hardison <dylan@mozilla.com> | 2016-05-20 22:34:35 +0200 |
commit | 8fda28c4c50530f9e04699874046df2eb459d40d (patch) | |
tree | 1ffaeb7863ee5224fb79e825cafa3a472e228bb1 /extensions/BugModal/lib/ActivityStream.pm | |
parent | d7db0c1d84c999b470d8f2c4ce870a012a4ce165 (diff) | |
download | bugzilla-8fda28c4c50530f9e04699874046df2eb459d40d.tar.gz bugzilla-8fda28c4c50530f9e04699874046df2eb459d40d.tar.xz |
Bug 1262462 - automatically collapse the first comment when it's empty
Diffstat (limited to 'extensions/BugModal/lib/ActivityStream.pm')
-rw-r--r-- | extensions/BugModal/lib/ActivityStream.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/extensions/BugModal/lib/ActivityStream.pm b/extensions/BugModal/lib/ActivityStream.pm index 86fa6bb3b..b3b8bbaa6 100644 --- a/extensions/BugModal/lib/ActivityStream.pm +++ b/extensions/BugModal/lib/ActivityStream.pm @@ -174,6 +174,10 @@ sub _add_comments_to_stream { $comment->{collapsed} = 1; $comment->{collapsed_reason} = $comment->author->name; } + if ($comment->type != CMT_ATTACHMENT_CREATED && $comment->count == 0 && length($comment->body) == 0) { + $comment->{collapsed} = 1; + $comment->{collapsed_reason} = 'empty'; + } _add_comment_to_stream($stream, date_str_to_time($comment->creation_ts), $comment->author->id, $comment); } |