Reduce overhead of Cache.h
This commit is contained in:
parent
7d6a015f36
commit
5fc1f3bd67
28 changed files with 1404 additions and 644 deletions
|
|
@ -203,7 +203,7 @@ UserProfile::init(const QString &userId, const QString &roomId)
|
|||
{
|
||||
resetToDefaults();
|
||||
|
||||
auto displayName = Cache::displayName(roomId, userId);
|
||||
auto displayName = cache::displayName(roomId, userId);
|
||||
|
||||
userIdLabel_->setText(userId);
|
||||
displayNameLabel_->setText(displayName);
|
||||
|
|
@ -215,9 +215,9 @@ UserProfile::init(const QString &userId, const QString &roomId)
|
|||
|
||||
try {
|
||||
bool hasMemberRights =
|
||||
cache::client()->hasEnoughPowerLevel({mtx::events::EventType::RoomMember},
|
||||
roomId.toStdString(),
|
||||
localUser.toStdString());
|
||||
cache::hasEnoughPowerLevel({mtx::events::EventType::RoomMember},
|
||||
roomId.toStdString(),
|
||||
localUser.toStdString());
|
||||
if (!hasMemberRights) {
|
||||
kickBtn_->hide();
|
||||
banBtn_->hide();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue