Update libqmatrixclient.
Enable member lazy loading. Some Qt 5.12 fix.
This commit is contained in:
parent
66e2d99620
commit
8300d022b2
|
@ -68,10 +68,8 @@ ColumnLayout {
|
|||
Control {
|
||||
Layout.maximumWidth: messageListView.width - (!sentByMe ? 32 + messageRow.spacing : 0) - 48
|
||||
|
||||
topPadding: 8
|
||||
bottomPadding: 8
|
||||
leftPadding: 16
|
||||
rightPadding: 16
|
||||
verticalPadding: 8
|
||||
horizontalPadding: 16
|
||||
|
||||
background: Rectangle {
|
||||
color: sentByMe ? "#009DC2" : eventType === "notice" ? "#4285F4" : "#673AB7"
|
||||
|
|
|
@ -48,7 +48,7 @@ Drawer {
|
|||
|
||||
wrapMode: Label.Wrap
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: room ? room.memberCount + " Members" : "No Member Count"
|
||||
text: room ? room.totalMemberCount + " Members" : "No Member Count"
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
|
|
@ -813,7 +813,11 @@ Rectangle {
|
|||
inviteDialog.currentRoom = currentRoom
|
||||
inviteDialog.open()
|
||||
} else {
|
||||
if (enteredRoom) {
|
||||
enteredRoom.displayed = false
|
||||
leaveRoom(enteredRoom)
|
||||
}
|
||||
currentRoom.displayed = true
|
||||
enterRoom(currentRoom)
|
||||
enteredRoom = currentRoom
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit be7d25ed22abd07a254bfb8ff6c30de4fcc79e6a
|
||||
Subproject commit fcc8d2ca615fce6e42bf1cf6585d60f94a2db926
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue