Add power level to the user details dialog
The only way to check a user's power level is to haul yourself over to the member list, which is cumbersome but also hard to parse - especially if a room has lots of members. This adds the user's power level to the existing details dialog. For example, this makes it easier to identify someone as a moderator if they sent a message in the room.
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
|
||||
#include <Quotient/user.h>
|
||||
|
||||
#include "enums/powerlevel.h"
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
class QmlUtils : public QObject
|
||||
@@ -38,6 +40,10 @@ public:
|
||||
Q_INVOKABLE QString escapeString(const QString &string);
|
||||
Q_INVOKABLE QColor getUserColor(qreal hueF);
|
||||
Q_INVOKABLE QQuickItem *focusedWindowItem();
|
||||
/**
|
||||
* @brief Invokable version of PowerLevel::nameForLevel.
|
||||
*/
|
||||
Q_INVOKABLE QString nameForLevel(PowerLevel::Level level);
|
||||
|
||||
private:
|
||||
QmlUtils() = default;
|
||||
|
||||
Reference in New Issue
Block a user