Enable lazy loading by default.

Also fixes undefined error when not logged in.
This commit is contained in:
Black Hat
2018-08-19 20:45:40 +08:00
parent cfe34e5303
commit 4d97fe6901
9 changed files with 24 additions and 19 deletions

View File

@@ -14,9 +14,7 @@ RoomListModel::RoomListModel(QObject* parent) : QAbstractListModel(parent) {}
RoomListModel::~RoomListModel() {}
void RoomListModel::setConnection(Connection* connection) {
Q_ASSERT(connection);
if (connection == m_connection) return;
if (!connection && connection == m_connection) return;
using QMatrixClient::Room;
m_connection = connection;