mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Dont show empty categories in viewer list.
This commit is contained in:
parent
6a9252ac12
commit
acd03a3280
|
@ -485,9 +485,12 @@ void Split::showViewerList()
|
|||
|
||||
loadingLabel->hide();
|
||||
for (int i = 0; i < jsonLabels.size(); i++) {
|
||||
auto currentCategory = chattersObj.value(jsonLabels.at(i)).toArray();
|
||||
// If current category of chatters is empty, dont show this category.
|
||||
if (currentCategory.size() == 0) continue;
|
||||
|
||||
chattersList->addItem(labelList.at(i));
|
||||
foreach (const QJsonValue &v,
|
||||
chattersObj.value(jsonLabels.at(i)).toArray())
|
||||
foreach (const QJsonValue &v, currentCategory)
|
||||
chattersList->addItem(v.toString());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue