From a96fbf1923f7f5c9e236255d22914441cc210872 Mon Sep 17 00:00:00 2001 From: Diadlo Date: Thu, 23 Nov 2017 16:50:29 +0300 Subject: [PATCH] refactor: Remove code duplication from GroupWidget Fix #2394 (4) --- src/widget/groupwidget.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/widget/groupwidget.cpp b/src/widget/groupwidget.cpp index 8ce90876e..c170a2796 100644 --- a/src/widget/groupwidget.cpp +++ b/src/widget/groupwidget.cpp @@ -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(); }