Add an option to lazy load room message at initial sync.

Reduces initial sync time. Useful if you joined a lot of rooms and have
a slow homeserver.
This commit is contained in:
Black Hat
2018-08-10 18:58:53 +08:00
parent 9a836a23fb
commit 4db5f3f355
9 changed files with 58 additions and 11 deletions

View File

@@ -42,6 +42,7 @@ void RoomListModel::doAddRoom(Room* r) {
if (auto* room = r) {
m_rooms.append(room);
connectRoomSignals(room);
emit roomAdded(room);
} else {
qCritical() << "Attempt to add nullptr to the room list";
Q_ASSERT(false);

View File

@@ -53,6 +53,7 @@ class RoomListModel : public QAbstractListModel {
signals:
void connectionChanged();
void roomAdded(Room* room);
void newMessage(Room* room);
};