diff --git a/CHANGELOG.md b/CHANGELOG.md index 9aeea040c..8f7e9b98a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Minor: Adjust large stream thumbnail to 16:9 (#3655) - Minor: Fixed being unable to load Twitch Usercards from the `/mentions` tab. (#3623) - Minor: Add information about the user's operating system in the About page. (#3663) +- Minor: Added chatter count for each category in viewer list. (#3683) - Bugfix: Fixed live notifications for usernames containing uppercase characters. (#3646) - Bugfix: Fixed certain settings dialogs appearing behind the main window, when `Always on top` was used. (#3679) - Bugfix: Fixed an issue in the emote picker where an emotes tooltip would not properly disappear. (#3686) diff --git a/src/widgets/splits/Split.cpp b/src/widgets/splits/Split.cpp index f22a36e66..2a0267a2b 100644 --- a/src/widgets/splits/Split.cpp +++ b/src/widgets/splits/Split.cpp @@ -983,13 +983,6 @@ void Split::showViewerList() static QStringList jsonLabels = {"broadcaster", "moderators", "vips", "staff", "admins", "global_mods", "viewers"}; - QList labelList; - for (auto &x : labels) - { - auto label = formatListItemText(x); - label->setForeground(this->theme->accent); - labelList.append(label); - } auto loadingLabel = new QLabel("Loading..."); NetworkRequest::twitchRequest("https://tmi.twitch.tv/group/user/" + @@ -1014,7 +1007,10 @@ void Split::showViewerList() if (currentCategory.empty()) continue; - chattersList->addItem(labelList.at(i)); + auto label = formatListItemText(QString("%1 (%2)").arg( + labels.at(i), localizeNumbers(currentCategory.size()))); + label->setForeground(this->theme->accent); + chattersList->addItem(label); foreach (const QJsonValue &v, currentCategory) { chattersList->addItem(formatListItemText(v.toString())); @@ -1055,7 +1051,9 @@ void Split::showViewerList() }); auto listDoubleClick = [=](QString userName) { - if (!labels.contains(userName) && !userName.isEmpty()) + // if the list item contains a parentheses it means that + // it's a category label so don't show a usercard + if (!userName.contains("(") && !userName.isEmpty()) { this->view_->showUserInfoPopup(userName); }