From 1919f0ca8eed2ccc26bfb6b1f11ef8654a7265fc Mon Sep 17 00:00:00 2001 From: Black Hat Date: Thu, 19 Jul 2018 12:04:53 +0800 Subject: [PATCH] Upgrade libqmatrixclient && tweak room list model. --- include/libqmatrixclient | 2 +- src/roomlistmodel.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/libqmatrixclient b/include/libqmatrixclient index f3a251404..f004c32ae 160000 --- a/include/libqmatrixclient +++ b/include/libqmatrixclient @@ -1 +1 @@ -Subproject commit f3a251404c00787b650e618fb5c257162507c18b +Subproject commit f004c32ae4291fd8eca7f4106af7582e6fc86f5a diff --git a/src/roomlistmodel.cpp b/src/roomlistmodel.cpp index 6dbbe5192..cb904e1ee 100644 --- a/src/roomlistmodel.cpp +++ b/src/roomlistmodel.cpp @@ -25,7 +25,7 @@ void RoomListModel::setConnection(QMatrixClient::Connection* connection) { connect(connection, &QMatrixClient::Connection::aboutToDeleteRoom, this, &RoomListModel::deleteRoom); - doResetModel(); + if (!connection->accessToken().isEmpty()) doResetModel(); } void RoomListModel::doResetModel() { @@ -54,8 +54,8 @@ void RoomListModel::connectRoomSignals(QMatrixClient::Room* room) { [=] { unreadMessagesChanged(room); }); connect(room, &QMatrixClient::Room::notificationCountChanged, this, [=] { unreadMessagesChanged(room); }); -// connect(room, &QMatrixClient::Room::unreadMessagesChanged, this, -// &RoomListModel::highlightCountChanged); + // connect(room, &QMatrixClient::Room::unreadMessagesChanged, this, + // &RoomListModel::highlightCountChanged); connect(room, &QMatrixClient::Room::joinStateChanged, this, [=] { refresh(room); }); connect(room, &QMatrixClient::Room::avatarChanged, this,