Basic header and footer of room list

This commit is contained in:
Nicolas Werner 2021-05-14 23:35:34 +02:00
parent 39a43ad4ab
commit 567fe81ad7
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
19 changed files with 385 additions and 175 deletions

View file

@ -27,9 +27,22 @@ UserProfile::UserProfile(QString roomid,
, manager(manager_)
, model(parent)
{
fetchDeviceList(this->userid_);
globalAvatarUrl = "";
connect(this,
&UserProfile::globalUsernameRetrieved,
this,
&UserProfile::setGlobalUsername,
Qt::QueuedConnection);
if (isGlobalUserProfile()) {
getGlobalProfileData();
}
if (!cache::client() || !cache::client()->isDatabaseReady())
return;
fetchDeviceList(this->userid_);
connect(cache::client(),
&Cache::verificationStatusChanged,
this,
@ -54,16 +67,6 @@ UserProfile::UserProfile(QString roomid,
}
deviceList_.reset(deviceList_.deviceList_);
});
connect(this,
&UserProfile::globalUsernameRetrieved,
this,
&UserProfile::setGlobalUsername,
Qt::QueuedConnection);
if (isGlobalUserProfile()) {
getGlobalProfileData();
}
}
QHash<int, QByteArray>
@ -157,6 +160,9 @@ UserProfile::fetchDeviceList(const QString &userID)
{
auto localUser = utils::localUser();
if (!cache::client() || !cache::client()->isDatabaseReady())
return;
cache::client()->query_keys(
userID.toStdString(),
[other_user_id = userID.toStdString(), this](const UserKeyCache &other_user_keys,