Reduce overhead of Cache.h

This commit is contained in:
Nicolas Werner 2019-12-15 02:56:04 +01:00
parent 7d6a015f36
commit 5fc1f3bd67
28 changed files with 1404 additions and 644 deletions

View file

@ -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();