Update libqmatrixclient.
Enable member lazy loading. Some Qt 5.12 fix.
This commit is contained in:
@@ -42,7 +42,12 @@ Controller::Controller(QObject* parent)
|
||||
QTimer::singleShot(0, this, SLOT(invokeLogin()));
|
||||
}
|
||||
|
||||
Controller::~Controller() {}
|
||||
Controller::~Controller() {
|
||||
for (Connection* c : m_connections) {
|
||||
c->stopSync();
|
||||
c->saveState();
|
||||
}
|
||||
}
|
||||
|
||||
inline QString accessTokenFileName(const AccountSettings& account) {
|
||||
QString fileName = account.userId();
|
||||
@@ -107,6 +112,8 @@ void Controller::addConnection(Connection* c) {
|
||||
|
||||
m_connections.push_back(c);
|
||||
|
||||
c->setLazyLoading(true);
|
||||
|
||||
connect(c, &Connection::syncDone, this, [=] {
|
||||
emit syncDone();
|
||||
c->sync(30000);
|
||||
|
||||
@@ -29,6 +29,7 @@ QImage ImageProvider::requestImage(const QString& id, QSize* pSize,
|
||||
QUrl mxcUri{id};
|
||||
|
||||
QImage result = image(mxcUri, requestedSize);
|
||||
if (result.isNull()) return {};
|
||||
if (!requestedSize.isEmpty() && result.size() != requestedSize) {
|
||||
QImage scaled = result.scaled(requestedSize, Qt::KeepAspectRatio,
|
||||
Qt::SmoothTransformation);
|
||||
|
||||
@@ -195,8 +195,6 @@ QDateTime SpectralRoom::lastActiveTime() {
|
||||
return messageEvents().rbegin()->get()->timestamp();
|
||||
}
|
||||
|
||||
float SpectralRoom::orderForTag(QString name) { return tag(name).order; }
|
||||
|
||||
int SpectralRoom::savedTopVisibleIndex() const {
|
||||
return firstDisplayedMarker() == timelineEdge()
|
||||
? 0
|
||||
|
||||
@@ -66,7 +66,6 @@ class SpectralRoom : public Room {
|
||||
}
|
||||
}
|
||||
|
||||
Q_INVOKABLE float orderForTag(QString name);
|
||||
Q_INVOKABLE int savedTopVisibleIndex() const;
|
||||
Q_INVOKABLE int savedBottomVisibleIndex() const;
|
||||
Q_INVOKABLE void saveViewport(int topIndex, int bottomIndex);
|
||||
|
||||
@@ -34,12 +34,8 @@ void UserListModel::setRoom(QMatrixClient::Room* room) {
|
||||
connect(m_currentRoom, &Room::memberRenamed, this,
|
||||
&UserListModel::userAdded);
|
||||
{
|
||||
QElapsedTimer et;
|
||||
et.start();
|
||||
m_users = m_currentRoom->users();
|
||||
std::sort(m_users.begin(), m_users.end(), room->memberSorter());
|
||||
qDebug() << "Sorting" << m_users.size() << "user(s) in"
|
||||
<< m_currentRoom->displayName() << "took" << et;
|
||||
}
|
||||
for (User* user : m_users) {
|
||||
connect(user, &User::avatarChanged, this, &UserListModel::avatarChanged);
|
||||
|
||||
Reference in New Issue
Block a user