Fix device list not showing up and UserProfile blocking the window
This commit is contained in:
parent
d307f24adf
commit
f2bc184550
8 changed files with 35 additions and 24 deletions
|
|
@ -40,7 +40,7 @@ public:
|
|||
|
||||
Q_INVOKABLE void openLink(QString link) const;
|
||||
|
||||
private slots:
|
||||
public slots:
|
||||
void updateUserProfile();
|
||||
|
||||
signals:
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ UserProfile::UserProfile(QString roomid,
|
|||
if (!cache::client() || !cache::client()->isDatabaseReady())
|
||||
return;
|
||||
|
||||
fetchDeviceList(this->userid_);
|
||||
connect(cache::client(),
|
||||
&Cache::verificationStatusChanged,
|
||||
this,
|
||||
|
|
@ -66,7 +65,9 @@ UserProfile::UserProfile(QString roomid,
|
|||
: verification::VERIFIED;
|
||||
}
|
||||
deviceList_.reset(deviceList_.deviceList_);
|
||||
emit devicesChanged();
|
||||
});
|
||||
fetchDeviceList(this->userid_);
|
||||
}
|
||||
|
||||
QHash<int, QByteArray>
|
||||
|
|
@ -223,6 +224,7 @@ UserProfile::fetchDeviceList(const QString &userID)
|
|||
}
|
||||
|
||||
this->deviceList_.queueReset(std::move(deviceInfo));
|
||||
emit devicesChanged();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ class UserProfile : public QObject
|
|||
Q_PROPERTY(QString displayName READ displayName NOTIFY displayNameChanged)
|
||||
Q_PROPERTY(QString userid READ userid CONSTANT)
|
||||
Q_PROPERTY(QString avatarUrl READ avatarUrl NOTIFY avatarUrlChanged)
|
||||
Q_PROPERTY(DeviceInfoModel *deviceList READ deviceList CONSTANT)
|
||||
Q_PROPERTY(DeviceInfoModel *deviceList READ deviceList NOTIFY devicesChanged)
|
||||
Q_PROPERTY(bool isGlobalUserProfile READ isGlobalUserProfile CONSTANT)
|
||||
Q_PROPERTY(int userVerified READ getUserStatus NOTIFY userStatusChanged)
|
||||
Q_PROPERTY(bool isLoading READ isLoading NOTIFY loadingChanged)
|
||||
|
|
@ -133,6 +133,7 @@ signals:
|
|||
void avatarUrlChanged();
|
||||
void displayError(const QString &errorMessage);
|
||||
void globalUsernameRetrieved(const QString &globalUser);
|
||||
void devicesChanged();
|
||||
|
||||
public slots:
|
||||
void updateAvatarUrl();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue