1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor: Remove code duplication from GroupWidget

Fix #2394 (4)
This commit is contained in:
Diadlo 2017-11-23 16:50:29 +03:00
parent 1eb0c4af26
commit a96fbf1923
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727

View File

@ -260,12 +260,5 @@ void GroupWidget::setName(const QString& name)
void GroupWidget::retranslateUi()
{
Group* g = GroupList::findGroup(groupId);
if (g) {
int peersCount = g->getPeersCount();
if (peersCount == 1)
statusMessageLabel->setText(tr("1 user in chat"));
else
statusMessageLabel->setText(tr("%1 users in chat").arg(peersCount));
}
updatePeerCount();
}