Use the libQuotient function to get the user power level as it is now equivalent

This commit is contained in:
James Graham
2025-01-11 13:17:10 +00:00
parent aa95bc62bd
commit a2f5a585e3
5 changed files with 6 additions and 31 deletions

View File

@@ -174,8 +174,8 @@ void UserListModel::refreshAllMembers()
m_members = m_currentRoom->joinedMemberIds();
MemberSorter sorter;
std::sort(m_members.begin(), m_members.end(), [&sorter, this](const auto &left, const auto &right) {
const auto leftPl = m_currentRoom->getUserPowerLevel(left);
const auto rightPl = m_currentRoom->getUserPowerLevel(right);
const auto leftPl = m_currentRoom->memberEffectivePowerLevel(left);
const auto rightPl = m_currentRoom->memberEffectivePowerLevel(right);
if (leftPl > rightPl) {
return true;
} else if (rightPl > leftPl) {
@@ -184,7 +184,6 @@ void UserListModel::refreshAllMembers()
return sorter(m_currentRoom->member(left), m_currentRoom->member(right));
});
}
endResetModel();
Q_EMIT usersRefreshed();