UX: Don't display participants count if it is zero.

This can happen for megatopics where we don't send
down the payload for participants count.
This commit is contained in:
Guo Xiang Tan 2018-06-22 08:32:20 +08:00
parent fed86225c8
commit 4c6a0a4046
1 changed files with 9 additions and 6 deletions

View File

@ -125,12 +125,15 @@ createWidget("topic-map-summary", {
h("h4", I18n.t("views_lowercase", { count: attrs.topicViews }))
])
);
if (attrs.participantCount > 0) {
contents.push(
h("li.secondary", [
numberNode(attrs.participantCount),
h("h4", I18n.t("users_lowercase", { count: attrs.participantCount }))
])
);
}
if (attrs.topicLikeCount) {
contents.push(