[UserList] Replace early return with if-else in updateSectionDivider

RickyRister nit: the code is easier to follow with a standard if-else
branch instead of an early return for the Buddy section.

Took 1 minute
This commit is contained in:
Lukas Brübach 2026-08-17 03:41:46 +02:00
parent ff27364264
commit 6ead408d48

View file

@ -1656,9 +1656,9 @@ void UserListWidget::updateSectionDivider(Section section)
// mirroring the "Buddies online: %1 / %2" title of the non-sectioned
// buddy list.
divider->setText(0, tr("%1 %2 (%3/%4)").arg(arrow, sectionTitle(section)).arg(online).arg(visible));
return;
} else {
divider->setText(0, tr("%1 %2 (%3)").arg(arrow, sectionTitle(section)).arg(visible));
}
divider->setText(0, tr("%1 %2 (%3)").arg(arrow, sectionTitle(section)).arg(visible));
}
void UserListWidget::handleSectionExpansion(QTreeWidgetItem *item, bool expanded)